Node Promiscuous Modules

    @alexisanzieu/passense

    2.9.6 • Public • Published

    @alexisanzieu/passense

    npm (scoped) npm bundle size SonarQube coverage

    Install

    $ npm install @alexisanzieu/passense
    

    Basic Usage

    const passense = require("@alexisanzieu/passense");
    
    //You need to pass a string value inside the function
    
    passense.validatePassword("this is a valid Password");
    //=>true
    
    
    passense.validatePassword("4344");
    //=>Error: The min lenght is 7 characters
    //     at passense (C:\Users\alexi\Documents\Dev\local\test\node_modules\@alexisanzieu\passense\lib\index.js:3:15)

    Advanced Usage

    Default configuration :

     {
        upperCase: {
            minimum: 1
        },
        length: {
            minimum: 7
        }
     }

    You can edit the configuration by adding a config object to the function:

    const passense = require("@alexisanzieu/passense");
    
    const config =  {
        length: {
            minimum: 8
        }
    }
    
    passense.validatePassword("this is a valid Password", config);
    //=>true
    
    
    passense.validatePassword("4344");
    //=>Error: The min lenght is 8 characters
    //     at passense (C:\Users\alexi\Documents\Dev\local\test\node_modules\@alexisanzieu\passense\lib\index.js:3:15)

    Your edition can contain both full or partial update of the default configuration.

    Install

    npm i @alexisanzieu/passense

    DownloadsWeekly Downloads

    5

    Version

    2.9.6

    License

    ISC

    Unpacked Size

    21.8 kB

    Total Files

    18

    Last publish

    Collaborators

    • alexisanzieu