rhymepass

1.0.4 • Public • Published

Rhymepass

Tests MIT License Downloads

Rhymepass is a simple Javascript library to build random literary passphrases, including rhyming ones.

Usage

import { getPassphrase, PartOfSpeech, ComplexType } from "rhymepass";

const { passphrase, entropy } = getPassphrase(
    [
        PartOfSpeech.ADJECTIVE,
        PartOfSpeech.NOUN,
        ComplexType.PAST_TENSE_VERB,
        PartOfSpeech.NOUN,
    ],
    [1, 2, 3, 2], // Rhyme Pattern
    25 // Minimum bits of entropy
);

console.log(passphrase, entropy);
// Output: HelpfulLayerFilmedPlayer 29.809370522853857

getPassphrase returns a random passphrase matching the provided requirements. If there is no passphrase matching those requirements with the minimum entropy (default 20 bits), then it returns null.

Package Sidebar

Install

npm i rhymepass

Weekly Downloads

2

Version

1.0.4

License

MIT

Unpacked Size

432 kB

Total Files

11

Last publish

Collaborators

  • cmdli