Added node module dependencies into version control
Test / test (push) Failing after 9s

This commit is contained in:
2023-07-27 20:18:19 +02:00
parent 4af7ecf55f
commit 9710f9c8a2
366 changed files with 95223 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
import { auth } from "./auth";
import { hook } from "./hook";
export const createTokenAuth = function createTokenAuth(token) {
if (!token) {
throw new Error("[@octokit/auth-token] No token passed to createTokenAuth");
}
if (typeof token !== "string") {
throw new Error("[@octokit/auth-token] Token passed to createTokenAuth is not a string");
}
token = token.replace(/^(token|bearer) +/i, "");
return Object.assign(auth.bind(null, token), {
hook: hook.bind(null, token),
});
};