New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

password-meter-pro

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

password-meter-pro

It is inspired by pointing system of Password Entropy, in which the main purpose is to help the end-users to have stronger passwords. (Password entropy is a measurement of how unpredictable a password is.)

latest
Source
npmnpm
Version
1.0.8
Version published
Weekly downloads
300
47.78%
Maintainers
1
Weekly downloads
 
Created
Source

Open Source Love npm version Downloads

Password Meter Pro

Password Meter Pro is inspired by pointing system of Password Entropy, in which the main purpose is to help the end-users to have stronger passwords. (Password entropy is a measurement of how unpredictable a password is.)

Installation

Use the package manager npm to install Password Meter Pro .

npm i password-meter-pro

Usage

It's very easy configure on your application. just follow on below:

let app = require("password-meter-pro");

app.password_strength("1111") # return  message = "Very Weak" , strength = 14  , percentage = 11%

app.password_strength("aaaa") # return  message = "Very Weak" , strength = 19 , percentage = 15%

app.password_strength("####") # returns message = "Very Weak" , strength = 21 , percentage = 17%

app.password_strength("banglad") # returns message = "Weak" , strength = 33  , percentage = 26%

app.password_strength("bangla1") # returns message = "Good" , strength = 37  , percentage = 29%

app.password_strength("bangladesh") # returns message = "Good" , strength = 48 , percentage = 38%

app.password_strength("bangla1desh") # returns message = "Good" , strength = 57 , percentage = 45%

app.password_strength("Bangla1desh") # returns message = "Strong", strength = 66, percentage = 52%

app.password_strength("Bangladesh#") # returns message = "Strong", strength = 71, percentage = 56%

app.password_strength("Bangla1desh#") # returns message = "Strong", strength = 79, percentage = 62%

app.password_strength("Hello71*Bangla1desh#") # returns message = "Very Strong" , strength = 132  , percentage = 100%

There are some default messages, if you need to configure your own message like "Very week" instead of "You should use strong password", you can do easily here:

// Example: default messages of package, 
{
    VERY_WEAK: "Very Weak",
    WEAK: "Weak",
    GOOD: "Good",
    STRONG: "Strong",
    VERY_STRONG: "Very Strong"
}

You can override these message by using "message" method:

app.message({
    VERY_WEAK: "You should use strong password",
});

app.password_strength("####") # returns 'You should use strong password'
//or
app.message({
    VERY_WEAK: "You should use strong password",
}).password_strength("####") # returns 'You should use strong password'

There are some default configs for checking validating items on password. if you want to customer that too, you can use "config" method.

// Default configs
{
    SMALL_LETTER : {
        min: 0,
        max: 26
    },
    CAPITAL_LETTER : {
        min: 0,
        max: 26
    },
    NUMERIC: {
        min: 0,
        max: 255
    },
    SPECIAL_CHAR: {
        min: 0,
        max: 33
    } 
}

You can override these configs:

app.config({
    // always checking length of given item of each type
    NUMERIC: {
        min: 2,
        max: 6
    },
});

app.password_strength("####") # returns 'Numeric letter must be min: 2 and max: 6'
//or
app.config({
    NUMERIC: {
        min: 2,
        max: 6
    }
}).password_strength("####") # returns 'Numeric letter must be min: 2 and max: 6'

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update the tests as appropriate.

License

MIT

Keywords

password

FAQs

Package last updated on 21 May 2020

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