0.0.23 • Published 5 years ago

passworder v0.0.23

Weekly downloads
92
License
-
Repository
-
Last release
5 years ago

passworder

Easy to use lib for generating and validating passwords.

Installation

npm i passworder

Usage

Generate password with default length (8 digits)

import passowrder from 'passworder'

passowrder.generate() // => "scs9&J01"

Generate password with custom length

import passowrder from 'passworder'

passowrder.generate(20) // => "scs9&J01ligb*0MB6fd0"

Validate password

import passowrder from 'passworder'

passworder.validate('1234lowercaseUPPERCASE') // => { status: true, warning: '' }
passworder.validate('only_lower_case_and_1234') // => { status: false, warning: "Your password should contain at least one uppercase letter" }

Use custom warning text

import passowrder from 'passworder'

passworder.digitErrorMessage = 'your custom digit error message'
passworder.lengthErrorMessage = 'your custom length error message'
passworder.uppercaseErrorMessage = 'your custom uppercase error message'

Generate custom password using words and numbers

import passowrder from 'passworder'

passworder.generateCustom('Mike', 1977, 'Donovan') // => { first: "Mike1977Donovan", second: "19MikeDonovan77", third: "Donovan1977Mike" }

github https://github.com/DenisKoba/passworder

0.0.23

5 years ago

0.0.22

5 years ago

0.0.21

5 years ago

0.0.20

5 years ago

0.0.19

5 years ago

0.0.18

5 years ago

0.0.17

5 years ago

0.0.16

5 years ago

0.0.15

5 years ago

0.0.14

5 years ago

0.0.13

5 years ago

0.0.12

5 years ago

0.0.11

5 years ago

0.0.10

5 years ago

0.0.9

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago