@aliases/zxcvbn
TypeScript icon, indicating that this package has built-in type declarations

0.0.3 • Public • Published

@aliases/zxcvbn

npm version npm downloads npm license Contributor Covenant

Low-budget password strength estimates, powered by Demo Macro.

This package is the typescript version of zxcvbn, which performs slightly better than the original version and is fully compatible with it.

Getting started

# npm
$ npm install @aliases/zxcvbn

# yarn
$ yarn add @aliases/zxcvbn

# pnpm
$ pnpm add @aliases/zxcvbn

Usage

import zxcvbn from "@aliases/zxcvbn";

console.log(zxcvbn("abc123"));
$ vite-node zxcvbn.ts
{
  password: 'abc123',
  guesses: 14,
  guesses_log10: 1.1461280356782377,
  sequence: [
    {
      pattern: 'dictionary',
      i: 0,
      j: 5,
      token: 'abc123',
      matched_word: 'abc123',
      rank: 13,
      dictionary_name: 'passwords',
      reversed: false,
      l33t: false,
      base_guesses: 13,
      uppercase_variations: 1,
      l33t_variations: 1,
      guesses: 13,
      guesses_log10: 1.1139433523068367
    }
  ],
  calc_time: 4,
  crack_times_seconds: {
    online_throttling_100_per_hour: 504,
    online_no_throttling_10_per_second: 1.4,
    offline_slow_hashing_1e4_per_second: 0.0014,
    offline_fast_hashing_1e10_per_second: 1.4e-9
  },
  crack_times_display: {
    online_throttling_100_per_hour: '8 minutes',
    online_no_throttling_10_per_second: '1 second',
    offline_slow_hashing_1e4_per_second: 'less than a second',
    offline_fast_hashing_1e10_per_second: 'less than a second'
  },
  score: 0,
  feedback: {
    warning: 'This is a top-100 common password',
    suggestions: [ 'Add another word or two. Uncommon words are better.' ]
  }
}

License

/@aliases/zxcvbn/

    Package Sidebar

    Install

    npm i @aliases/zxcvbn

    Weekly Downloads

    2

    Version

    0.0.3

    License

    MIT

    Unpacked Size

    1.7 MB

    Total Files

    6

    Last publish

    Collaborators

    • demomacro