simplepass-js

0.0.3 • Public • Published

npm version

npm install simplepass-js

How to use

Import the module:

import Password from 'simplepass-js'

Generate a password:

Password.generate(passwordLength, allowNumbers, specialCharactersLevel)

passwordLength - {Number}: password length. The default password length is 8.

allowNumbers - {Boolean}: allow to contain numbers.

specialCharacters - {Number, possible values: 0-3}: allow to contain a special characters.

specialCharacters = 0- no special characters.

specialCharacters = 1 - allow to contain a regular special characters like a !@#$%^&*.

specialCharacters = 2 - allow to contain a non-regular special characters like a ×·∗÷.

specialCharacters = 3 - allow to contain a non-regular special characters like a ɲŋʈɖɟɢʔɨʉɯ.

Examples:

Password.generate(8, 0, 0) will generate a 8-character password without numbers and special chars.

Password.generate(8, 1, 0) will generate a 8-character password which contain numbers and without special chars.

Password.generate(8, 1, 1) will generate a 8-character password with numbers and regular special chars.

/simplepass-js/

    Package Sidebar

    Install

    npm i simplepass-js

    Weekly Downloads

    14

    Version

    0.0.3

    License

    ISC

    Last publish

    Collaborators

    • s.cher