We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
npm
new npm token use npm prefix. We should support new npm token format.
npm has a new access token format | GitHub Changelog
(IT IS DUMMY)
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
npm_ qkJaB6MffYVzZXWqmcoF49yrUxP3wf 0LsakP prefix Token CRC32
GitHub Token is similar approach #153
The text was updated successfully, but these errors were encountered:
// https://gist.github.com/kevinyan815/f71b2f5ca3541631abd2e50f3929739b function toBase62(n) { if (n === 0) { return '0'; } const digits = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'; let result = ''; while (n > 0) { result = digits[n % digits.length] + result; n = parseInt(n / digits.length, 10); } return result; } //https://stackoverflow.com/a/18639999 const crc32 = function (str) { const makeCRCTable = function () { var c; var crcTable = []; for (var n = 0; n < 256; n++) { c = n; for (var k = 0; k < 8; k++) { c = ((c & 1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1)); } crcTable[n] = c; } return crcTable; }; const crcTable = makeCRCTable(); let crc = 0 ^ (-1); for (let i = 0; i < str.length; i++) { crc = (crc >>> 8) ^ crcTable[(crc ^ str.charCodeAt(i)) & 0xFF]; } return (crc ^ (-1)) >>> 0; }; console.log(toBase62(crc32("qkJaB6MffYVzZXWqmcoF49yrUxP3wf")).padStart(6, "0")); // "0LsakP"
minimal implementation for CRC32. I do not know that this base62 encoding does not match upper-case and lower-case.
Reference
Sorry, something went wrong.
npm_
Successfully merging a pull request may close this issue.
Summary
new npm token use
npm
prefix.We should support new npm token format.
npm has a new access token format | GitHub Changelog
Basic example
(IT IS DUMMY)
Related
GitHub Token is similar approach #153
The text was updated successfully, but these errors were encountered: