Initial commit

This commit is contained in:
abrendan
2023-11-30 14:15:19 +00:00
commit e4599df811
5457 changed files with 500139 additions and 0 deletions

25
node_modules/rndm/index.js generated vendored Normal file
View File

@@ -0,0 +1,25 @@
var assert = require('assert')
var base62 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'
var base36 = 'abcdefghijklmnopqrstuvwxyz0123456789'
var base10 = '0123456789'
exports = module.exports = create(base62)
exports.base62 = exports
exports.base36 = create(base36)
exports.base10 = create(base10)
exports.create = create
function create(chars) {
assert(typeof chars === 'string', 'the list of characters must be a string!')
var length = Buffer.byteLength(chars)
return function rndm(len) {
len = len || 10
assert(typeof len === 'number' && len >= 0, 'the length of the random string must be a number!')
var salt = ''
for (var i = 0; i < len; i++) salt += chars[Math.floor(length * Math.random())]
return salt
}
}