Have ideas to improve npm?Join in the discussion! »

    human-password

    1.0.4 • Public • Published

    HumanPassword

    Simple library to generate a password (string + number) easy to remember.

    Build Status Coverage Status

    Installation

    npm install human-password --save

    Example

    Basic

    var humanPassword = require('human-password');
     
    humanPassword();
    // => 'fuxeru9070'

    With options

    Name Type Default Description
    couples integer 3 Couple of consonant + vowel
    digits integer 4 Number of digits, if is 0 number will be hidden
    randomUpper boolean false Random letters uppercase
    numberPosition string end Number position in string, can be "start", "middle", "end" and "random"
    var humanPassword = require('human-password');
     
    humanPassword({
        couples: 5,
        digits: 4,
        randomUpper: true
    });
    // => 'PutIGoKobi7136'
     
    // Hide number
    humanPassword({
        couples: 5,
        digits: 0
    });
    // => 'gicominobi'
     
    // Number in start position
    humanPassword({
        couples: 5,
        digits: 4,
        numberPosition: 'start'
    });
    // => '6539vikohylure'

    License

    HumanPassword is open-sourced software licensed under the MIT license

    Author

    Fabio Ricali

    Install

    npm i human-password

    DownloadsWeekly Downloads

    8

    Version

    1.0.4

    License

    MIT

    Last publish

    Collaborators

    • avatar