package
A measure of the strength of the password for node js developer 📏 ..
npm install p-meterGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
Estimated unpacked size across 1 packages.
8.7 kB
Includes dependencies.

quick way to measure the strength of the password.
The purpose of this module is to analyze the password and then categorize it according to our rules mentioned in the documentation where you can view the result numerical or textual.
NOTE: we verify that a blank password or that
there are spaces are passed to the module function.
# npm
$ npm install p-meter
# yarn
$ yarn add p-meterconst pwdMeter = require('p-meter')
const password = '199812+imeD'
// 1.x.x
// const result = pwdMeter (password, { displayString: true, useSpace: false })
// 2.x.x
// the default value of displayString and useSpace is false
const result = pwdMeter (password, { displayString: true })NOTE: This example is the simplest thing to write.
For more examples you will find them in a section of exemples.
The result can be displayed in a two different way (Numerical or Textual). In this section we illustrate the two ways of seeing the result.
1- Numerical:
| -1 | 0 | 1 | 2 | 3 | 4 | 5 | 6 |
|---|
// 1.x.x
const result = passwordMeter(password, { displayString: false, useSpace: false })
// 2.x.x
// the default value of displayString and useSpace is false
const result = passwordMeter(password)2 - Textual :
| ERROR | FAIBLE | AVG | ABOVE AVG | STRONG AVG | FORT | ABOVE FORT | STRONG FORT |
|---|
// 1.x.x
const result = passwordMeter(password, { displayString: true, useSpace: false })
// 2.x.x
// the default value of displayString and useSpace is false
const result = passwordMeter(password, { displayString: true })We can divide passwords into four categories (numbers, uppercase alphabet, lowercase alphabet and special characters) ..
We have 8 levels of results: