1.0.1 • Published 7 years ago

string_generator v1.0.1

Weekly downloads
5
License
ISC
Repository
github
Last release
7 years ago

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 characters
  • upperCase - (boolean) will the string contain upper case characters
  • numbers - (boolean) will the string contain numbers
  • specialChar - (boolean) will the string contian speical characters
  • readable - (boolean) will the string contain iIlLoO0
  • exclude - (array) what characters are to be excluded from the string