change-string-case/node_modules/@octokit/auth-token/dist-src/with-authorization-prefix.js

10 lines
183 B
JavaScript
Raw Normal View History

2023-10-26 04:27:07 +08:00
function withAuthorizationPrefix(token) {
if (token.split(/\./).length === 3) {
return `bearer ${token}`;
}
return `token ${token}`;
2022-11-04 00:55:07 +08:00
}
2023-10-26 04:27:07 +08:00
export {
withAuthorizationPrefix
};