1.0.3 • Published 5 years ago
randomstring-js v1.0.3
randomstring-js
Libary to create random strings.
Installation
You need to use npm to install randomstring-js:
npm install randomstring-jsUsage
import {randomstring} from 'randomstring-js'
randomstring()
>> "9Cey30r31oLyvWHWXZO0fDAdWN7kf6uw"
randomstring(10)
>> "kybqes7eJt"
randomstring({
length: 16,
charset: 'alphanumeric'
})
>> "v82ntOfiwi3u0V1P"
randomstring.generate({
charset: 'thiago'
})
>> "gohgoogiaoigthiitaatiitgotatoogh"OPTIONS
randomstring-js
randomstring(options)length- default: 32charset- default: 'alphanumeric'custom- any given characters from a word or phrasealphanumeric- 0-9 a-z A-Zalphabetic- a-z A-Znumeric- 0-9binary- 0-1hex- 0-9 a-f
LICENSE
randomstring-js is licensed under the MIT license