2.0.1 • Published 2 years ago

genepass v2.0.1

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

Genepass v2.0.1

Generic badge

Generate a random customizable passwords

Installation

Using npm

$ npm i --save genepass

Usage

In Node.js

"length" of password generated must be defined, then "lowercase", "uppercase" or "number" must exists next to this.

const genepass = require('genepass');

const password = genepass.build({
    length: 12, // Required attribute
    lowercase: true,
    uppercase: true,
    number: true,
    special: true,
});

/**
 * Return example
 * password = "!UghH1!#e21T"
 * /

Supported attributes

AttributeData TypeDescriptionRequiredDefault
lengthNumberLength of generated password, between 0 and 2048true-
lowercaseBooleanAt least one lowercase word in the generated passwordfalsefalse
uppercaseBooleanAt least one uppercase word in the generated passwordfalsefalse
numberBooleanAt least one number in the generated passwordfalsefalse
specialBooleanAt least one special character in the generated password. Could include: $, %, @, !, ?, #falsefalse

Important

  • length attribute is required
  • It is necesary choose one of attribute apart of length.

Supported format examples

Return a combination lowercase uppercase password and 8 of length

const genepass = require('genepass');

const password = genepass.build({
    length: 8,
    lowercase: true,
    uppercase: true,
});

/**
 * Return example
 * password = "ReyDFHbp"
 * /

Return a PIN and 6 of length

const genepass = require('genepass');

const password = genepass.build({
    length: 6,
    number: true,
});

/**
 * Return example
 * password = "218152"
 * /

Return a hard password

const genepass = require('genepass');

const password = genepass.build({
    length: 32,
    lowercase: true,
    uppercase: true,
    number: true,
    special: true,
});

/**
 * Return example
 * password = "t13Yq#Kb1D%%pF%SM@121%4#k!jjTq1Q"
 * /
2.0.1

2 years ago

2.0.0

2 years ago

1.0.1

4 years ago

1.0.0

4 years ago

0.2.2

4 years ago

0.2.1

4 years ago

0.2.0

4 years ago

0.1.0

4 years ago