![require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages](https://cdn.sanity.io/images/cgdhsj6q/production/be8ab80c8efa5907bc341c6fefe9aa20d239d890-1600x1097.png?w=400&fit=max&auto=format)
Security News
require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
@zxcvbn-ts/language-common
Advanced tools
@zxcvbn-ts/language-common is a TypeScript library that provides common language data for the zxcvbn-ts password strength estimator. It includes dictionaries and scoring functions to help evaluate password strength based on common patterns, words, and sequences.
Common Words Dictionary
This feature provides a dictionary of common words that are used to evaluate the strength of a password. The dictionary helps in identifying weak passwords that contain easily guessable words.
const commonWords = require('@zxcvbn-ts/language-common').dictionary.commonWords;
console.log(commonWords);
L33t Speak Dictionary
This feature includes a dictionary for l33t speak (leet speak) transformations. It helps in identifying passwords that use common character substitutions, such as '3' for 'E' or '1' for 'I'.
const l33tTable = require('@zxcvbn-ts/language-common').dictionary.l33tTable;
console.log(l33tTable);
Scoring Functions
This feature provides scoring functions to evaluate the strength of a password based on the most guessable match sequence. It helps in determining how easily a password can be guessed.
const scoring = require('@zxcvbn-ts/language-common').scoring;
const score = scoring.mostGuessableMatchSequence('password123', []);
console.log(score);
zxcvbn is a password strength estimator inspired by password crackers. It is a comprehensive library that evaluates password strength based on common patterns, words, and sequences. Compared to @zxcvbn-ts/language-common, zxcvbn is a more complete solution that includes both the language data and the estimation logic.
owasp-password-strength-test is a library that provides password strength testing based on the OWASP guidelines. It includes checks for common patterns, dictionary words, and character sequences. While it offers similar functionality to @zxcvbn-ts/language-common, it is more focused on adhering to OWASP standards.
password-validator is a simple library for validating passwords against a set of rules. It allows you to define custom rules for password strength, such as minimum length, required character types, and forbidden words. Unlike @zxcvbn-ts/language-common, it does not provide dictionaries or scoring functions but offers flexibility in defining password policies.
The common dictionary and language package for zxcvbn-ts
npm install @zxcvbn-ts/language-common --save
yarn add @zxcvbn-ts/language-common
import { zxcvbn, zxcvbnOptions } from '@zxcvbn-ts/core'
import * as zxcvbnCommonPackage from '@zxcvbn-ts/language-common'
const password = 'somePassword'
const options = {
...zxcvbnCommonPackage,
}
zxcvbnOptions.setOptions(options)
zxcvbn(password)
FAQs
The common language package for zxcvbn-ts
The npm package @zxcvbn-ts/language-common receives a total of 106,695 weekly downloads. As such, @zxcvbn-ts/language-common popularity was classified as popular.
We found that @zxcvbn-ts/language-common 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
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.