randomstringsgenerator

0.0.6 • Public • Published

randomstringsgenerator

This package will generate a random string with params, for example you can use this package to generate passwords.

Getting started :

npm i randomstringsgenerator

Or

yarn add randomstringsgenerator

Next we import it

const rsg = require('randomstringsgenerator')

How to use:

The packge accepts 2 inputs, if you call the generator without passing any params,
it will return a random string including lowerCase and numbers only, with the length of 10 chars.

Inputs :

1- length => a number, represents the length of the string.
2- params => Array [] accepts the following strings ['upperCase', 'lowerCase', 'specialChars', 'numbers'].

rsg(length,params)

Example

If i want a random string including uppercase, lowercase, special characters and numbers, with a length of 15

rsg(15,['numbers','upperCase','lowerCase','specialChars'])

Package Sidebar

Install

npm i randomstringsgenerator

Weekly Downloads

29

Version

0.0.6

License

ISC

Unpacked Size

2.85 kB

Total Files

4

Last publish

Collaborators

  • 0x4bd0