Skip to content

Module for score of password / check required cases and get common state of password

Notifications You must be signed in to change notification settings

stetsd/pass-power

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pass-power

Simple tool for checks required conditions in password and sets scores power

Install

npm i pass-power

Usage

const {passScore, passAccept} = require('pass-power');

API

passScore(val, minPassLength, analysis)

This method return result of validation compliance with input conditions

val - Type string

minPassLength - Type number

Minimal password length

analysis - Type array

In current moment available more common cases:

  • hasUppercase
  • hasLowercase
  • hasDigits
  • hasSpecials
passScore('987654321Qq#', 8, ['hasUppercase', 'hasLowercase', 'hasDigits', 'hasSpecials'])

passAccept(resultObject)

Gets result of method passScore() and return common state of validation (true/false)

resultObject - Type object

passAccept(passScore('12345', 5, ['hasDigits']))

License

ISC©

About

Module for score of password / check required cases and get common state of password

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published