dicepass
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

Dicepass

npm version

This package generates secure and memorable passphrases using the EFF's Diceware wordlist.

Installation

npm install dicepass

Usage

const passphrase = require("dicepass");

console.log(passphrase()); // Example output: "crown-upside-expose-attic-rhyme-fuel"

console.log(passphrase(10, "_", true)); // Example output: "Active_Laugh_Blanket_Light_Discuss_Contact_Empower_Yard_Curve_Muscle"

API

passphrase(wordCount?: number, delimiter?: string, camelCase?: boolean): string

Generate a passphrase.

wordCount (optional): The number of words in the passphrase. Defaults to 6.
delimiter (optional): The character(s) used to separate the words. Defaults to "-".
camelCase (optional): Whether to capitalize the first letter of each word. Defaults to false.

Returns a string representing the passphrase.

License

MIT

Package Sidebar

Install

npm i dicepass

Weekly Downloads

0

Version

0.0.2

License

MIT

Unpacked Size

167 kB

Total Files

5

Last publish

Collaborators

  • jale37