Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
@zxcvbn-ts/core
Advanced tools
@zxcvbn-ts/core is a TypeScript implementation of the popular zxcvbn password strength estimator. It provides a way to evaluate the strength of passwords and offers feedback on how to improve them. This package is useful for enhancing security by ensuring users create strong passwords.
Password Strength Estimation
This feature allows you to estimate the strength of a given password. The result includes a score and feedback on how to improve the password.
const zxcvbn = require('@zxcvbn-ts/core');
const result = zxcvbn('password123');
console.log(result);
Feedback on Password
This feature provides feedback on the given password, suggesting ways to make it stronger.
const zxcvbn = require('@zxcvbn-ts/core');
const result = zxcvbn('password123');
console.log(result.feedback);
Password Strength Score
This feature returns a score between 0 and 4 indicating the strength of the password, with 0 being very weak and 4 being very strong.
const zxcvbn = require('@zxcvbn-ts/core');
const result = zxcvbn('password123');
console.log(result.score);
zxcvbn is the original password strength estimator developed by Dropbox. It is written in JavaScript and provides similar functionality to @zxcvbn-ts/core, including password strength estimation and feedback. However, it is not written in TypeScript, which may be a consideration for TypeScript projects.
owasp-password-strength-test is a password strength tester that follows the guidelines provided by the OWASP (Open Web Application Security Project). It provides a different approach to password strength estimation compared to @zxcvbn-ts/core, focusing on compliance with OWASP standards.
password-validator is a simple and flexible password validation library. It allows you to define custom rules for password strength, which can be more flexible than the predefined rules in @zxcvbn-ts/core. However, it does not provide the same level of detailed feedback and scoring.
zxcvbn is a password strength estimator inspired by password crackers. It recognizes and analyzes over 40 thousand common passwords using pattern matching and conservative estimation and filters out common first names, last names, popular words from Wikipedia and common words in many cultures, and recognizes common patterns like dates, repetitions (e.g. 'aaa'), sequences (e.g. 'abcd'), keyboard smashes (e.g. 'qwertyuiop'), and l33t speak.
npm install @zxcvbn-ts/core @zxcvbn-ts/language-common --save
yarn add @zxcvbn-ts/core @zxcvbn-ts/language-common
import { ZxcvbnFactory } from '@zxcvbn-ts/core'
import * as zxcvbnCommonPackage from '@zxcvbn-ts/language-common'
import * as zxcvbnEnPackage from '@zxcvbn-ts/language-en'
const options = {
dictionary: {
...zxcvbnCommonPackage.dictionary,
...zxcvbnEnPackage.dictionary,
},
graphs: zxcvbnCommonPackage.adjacencyGraphs,
translations: zxcvbnEnPackage.translations,
}
const zxcvbn = new ZxcvbnFactory(options)
const password = 'somePassword'
zxcvbn.check(password)
FAQs
Realistic password strength estimation written in typescript
The npm package @zxcvbn-ts/core receives a total of 141,342 weekly downloads. As such, @zxcvbn-ts/core popularity was classified as popular.
We found that @zxcvbn-ts/core demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.