This repository has been archived on 2018-10-12. You can view files and clone it, but cannot push or open issues or pull requests.
|
|
|
var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'
|
|
var length = chars.length
|
|
|
|
module.exports = function rndm(len) {
|
|
var salt = ''
|
|
for (var i = 0; i < len; i++)
|
|
salt += chars[Math.floor(length * Math.random())]
|
|
return salt
|
|
}
|