1.0.5 • Published 2 years ago

randomstring-yt v1.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Simple Random String

Simple, random string generator

Installation

$npm i randomstring-yt

Features

  • Lower characters
  • Upper characters
  • Numbers
  • Customizable special characters
  • Repeatable or not, special characters

default.js

default options

const defaults = {
    lowersCount: 3,
    uppersCount: 3,
    numbersCount: 3,
    specialsCount: 1,
    specials: '_',
    canSpecialRepeat: true
};

usage

const randomstring = require("randomstring-yt");

const rs = randomstring();

console.log(rs);
// 10 characters
// output: x4I_Op03sI

optional.js

const randomstring = require("randomstring-yt");

const rs = randomstring({
    lowersCount: 4,
    uppersCount: 2,
    numbersCount: 2,
    specialsCount: 2,
    specials: '_-!.'
});

console.log(rs);
// output: Yw-W6o_hZ4q

specialnotrepeat.js

const randomstring = require("randomstring-yt");

const rs = randomstring({
    specialsCount: 4,
    canSpecialRepeat: false,
    specials: '_-!.'
});

console.log(rs);
// output: 4-d13.M_gDz!Z

|NOTE| if all options are set to 0 then the output will be 'yoo'

License

MIT

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago