1.0.0 • Published 4 years ago

random-stringinizer v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
4 years ago

Radom Stringinizer

Generate random crypto strings with ease, no fuss!

A simple Example

let randomstring = require('random-stringinizer')
let string = randomstring({len:21, char:"ABCDSWIOUP"})
console.log(string);

or

let randomstring = require('random-stringinizer');
let string = randomstring({len:20, typeOf:"ascii"});
/*
Other types further discussed about below
Note: You cannot use the char(character) parameter with typeOf parameter.
*/
console.log(string);

Options

len

required

Specify the length of the string.

typeOf

optional, default: hexadecimal

Specify the typeOf string.

url -> For url-safe character string.

hexadecimal -> For hexadecimal string.

base64 -> For base64 type string.

distinct -> For distinct characters string i.e., each different from the other.

alphanumeric -> Numeric characters mixed with alphabets.

numeric -> For numeric type string.

ascii -> For ascii printable strings.

char

Specify the characters that have to be randomized

example

const randomstring = require('random-stringinizer');
const string = randomstring({len:10, char:"ANW129220348YR"})
console.log(string);

Remember you cannot use char and typeOf together must be either one or none.

Other Projects

Callista Hive-db