dicepass

0.0.1 • 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

2

Version

0.0.1

License

MIT

Unpacked Size

166 kB

Total Files

4

Last publish

Collaborators

  • jale37