string_generator
v1.0.1
Published
A string generator by requested fields
Downloads
3
Maintainers
Readme
StringGenerator
A nodeJS modules for generating random strings
Installation
TO install string generator, use npm:
npm install string_generator
Usage
var string_gen = require("string_generator);
string_gen.genString(options); // Generate 1 random string
string_gen.genStrings(amount, options); //Generate (amount) random string
string_gen.defaultValues ={
"length": 32,
"lowerCase": true,
"upperCase": false,
"numbers": false,
"specialChar": false,
"readable": false,
"exclude": []
};
Options
length
- (int) the length of the random string.lowerCase
- (boolean) will the string contain lower case charactersupperCase
- (boolean) will the string contain upper case charactersnumbers
- (boolean) will the string contain numbersspecialChar
- (boolean) will the string contian speical charactersreadable
- (boolean) will the string contain iIlLoO0exclude
- (array) what characters are to be excluded from the string