1.0.6 • Published 4 years ago

password_with_constrains v1.0.6

Weekly downloads
7
License
ISC
Repository
-
Last release
4 years ago

PASSWORD GENERATOR

This pkg will be responsible to generate the random password with suppled constraints like Upper Case, Lower Case, Numeric Value etc.

Getting Started and Example

Consider the following example it's simple as that :-

const passGenerator = require('password_with_constrains');
const requiredFieldsObject = {
    upperCase: {
        required: true,
        max: 2,
        min: 1,
    },
    lowerCase: {
        required: true,
        max: 4,
        min: 1,
    },
    specialCharacter: {
        required: true,
        max: 1,
        min: 1,
    },
    numericValue: {
        required: true,
        max: 1,
        min: 1,
    },
};
const MAX_PASS_LENGTH = 9 ;
const MIN_PASS_LENGTH = 6 ;
(async () => {
    try {
        const password = await passGenerator(MIN_PASS_LENGTH, MAX_PASS_LENGTH, requiredFieldsObject)
        console.log(password)
    } catch (error) {
        console.log(error)
    }
})();

Authors

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago