Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

check-pwnedpasswords

jzhobes815MIT1.4.0

A simple Node.js module that checks against the https://haveibeenpwned.com database through its https://api.pwnedpasswords.com API.

haveibeenpwned, pwnedpasswords, hibp, pwned, security

readme

check-pwnedpasswords

A simple Node.js module that checks against the https://haveibeenpwned.com database through its https://api.pwnedpasswords.com API.

Usage

const checkPwnedPasswords = require('check-pwnedpasswords');

await checkPwnedPasswords('foobar');
// Output: {pwnd: true, occcurrences: <number of times the password has been seen>}

await checkPwnedPasswords('<secure password>');
// Output: {pwnd: false, occcurrences: 0}

// Optional second timeout argument in milliseconds (defaults to 5000):
await checkPwnedPasswords('<secure password>', 1000);