1.0.4 • Published 2 years ago

rhymepass v1.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

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.

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago