Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

I built a 3KB alternative to replace zxcvbn (389KB) without detection loss

说明与用途

Passcore 是一个 3 KB 的密码强度评估库,替代 389 KB 的 zxcvbn,保持相同的检测率,同时显著减少加载时间和评估延迟,提升 Core Web Vitals 指标。

问题

zxcvbn, the most widely used password strength estimator, is 389 KB gzipped, unmaintained since 2017, and adds noticeable load time to registration pages, hurting UX and conversion.

结果

passcore delivers the same 98.4 % detection rate as zxcvbn while shrinking the bundle size by 130×, speeding up load and evaluation times, and improving Core Web Vitals scores.

工作流

  • 1. Install passcore via npm: npm i passcorelib.
  • 2. Import the library: import { passcore } from 'passcorelib';.
  • 3. Replace zxcvbn calls: const { score } = passcore(password);.
  • 4. Update UI to use the returned score and warning fields.
  • 5. Test on existing forms to ensure functionality and UX remain unchanged.

证据

passcore loads in ~0.2 ms. It evaluates a password in ~2,600 nanoseconds.

来源

98.4% detection rate on real breach data, same as zxcvbn.

来源

  • 记录日期: 2026-09-07T02:22:52.936Z