You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

common-password-rules

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

common-password-rules

Validation methods for some common password policies

0.1.2
latest
Source
npmnpm
Version published
Weekly downloads
132
-16.98%
Maintainers
1
Weekly downloads
 
Created
Source

common-password-rules Build Status Coverage Status

Validation methods for some common password policies.

Install

npm install common-password-rules

Usage

const cPR = require('common-password-rules');

cPR.containsLowerCase('Foo'); // => true

API

containsLowerCase(password, [times]) ⇒ Boolean

Checks whether the given password contains a lowercase letter.

ParamTypeDefaultDescription
passwordStringPassword string
[times]Integer1Minimum number of required lowercase letters

containsUpperCase(password, [times]) ⇒ Boolean

Checks whether the given password contains an uppercase letter.

ParamTypeDefaultDescription
passwordStringPassword string
[times]Integer1Minimum number of required uppercase letters

containsDigit(password, [times]) ⇒ Boolean

Checks whether the given password contains a digit.

ParamTypeDefaultDescription
passwordStringPassword string
[times]Integer1Minimum number of required digits

containsSpecialChar(password, [times]) ⇒ Boolean

Checks whether the given password contains a special (non-word) character.

ParamTypeDefaultDescription
passwordStringPassword string
[times]Integer1Minimum number of required special characters

contains(password, charSet, [times]) ⇒ Boolean

Checks whether the given password contains a character from the given set.

ParamTypeDefaultDescription
passwordStringPassword string
charSetStringA regex character set
[times]Integer1Minimum number of required characters

excludesRecurringChars(password, [times]) ⇒ Boolean

Checks that the given password does not contain recurring alphanumeric characters.

ParamTypeDefaultDescription
passwordStringPassword string
[times]Integer3Minimum recursion number

excludesSequentialLetters(password, [times]) ⇒ Boolean

Checks that the given password does not contain sequential case-insensitive letters.

ParamTypeDefaultDescription
passwordStringPassword string
[times]Integer3Minimum sequence

excludesSequentialDigits(password, [times]) ⇒ Boolean

Checks that the given password does not contain sequential digits.

ParamTypeDefaultDescription
passwordStringPassword string
[times]Integer3Minimum sequence

excludesBirthDate(password) ⇒ Boolean

Checks that the given password does not a possible birth-date.

ParamTypeDescription
passwordStringPassword string

License

MIT http://tameraydin.mit-license.org/

Keywords

most

FAQs

Package last updated on 08 Mar 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts