Skip to content

Latest commit

 

History

History
36 lines (25 loc) · 1.47 KB

README.md

File metadata and controls

36 lines (25 loc) · 1.47 KB

Extended form of @ZaneHannanAU/xkcd-z-password, doing simple removal of "bad" words from the main package, further cutting it (by default) to 70669 total possible items from 70806 by default.

Original remover function gist.

Usage

const xkcdPassword = require('xkcd-z-password-nobadwords')();

xkcdPassword.generate().then(arr => console.log(arr.join(' ')))
// Shouldn't have any "bad" words

Defaults:

const nobad = require('xkcd-z-password-nobadwords')
const xkcdPassword = nobad({
  numWords: 4, minLength: 5, maxLength: 8,
  // badwords: new nobad.Badwords(), // a function with a .test(word) method
  // filter(word) {return minLength <= word.length <= maxLength} // one word function.
})

Reporting

If you find more bad words in the list, please submit an issue.

If the issue is not relevant to this list, please submit an issue on the main package.