1.4.0 • Published 1 year ago
@mineot/gen_password v1.4.0
GenPassword
Generate Password API, is a easy way to generate passwords
Install
npm i @mineot/gen_password
Use
import { GenPassword, TypeEnum, DimensionEnum, GenPasswordError } from "@mineot/gen_password";
try {
const password = await GenPassword(TypeEnum.ONLY_NUMBERS, DimensionEnum.FOUR);
console.log(password);
} catch (err) {
// err is instanceof GenPasswordError
console.error(err);
}
GenPassword(TypeEnum.ONLY_NUMBERS, DimensionEnum.FOUR)
.then((res) => {
console.log(res);
})
.catch((err) => {
// err instanceof GenPasswordError
console.error(err);
});
Type Enum
Types | Description |
---|---|
ONLY_NUMBERS | The password will only contain numbers |
ONLY_ALPHAS | The password will only contain characters |
ALPHA_NUMERIC | The password will contain characters and numbers |
COMPLEX | The password will contain characters, numbers and this special chars |
Dimension Enum
Dimensions | Description |
---|---|
FOUR | The max password size will be 04 |
SIX | The max password size will be 06 |
EIGTH | The max password size will be 08 |
TEN | The max password size will be 10 |
TWELVE | The max password size will be 12 |
FOURTEEN | The max password size will be 14 |
SIXTEEN | The max password size will be 16 |
EIGHTEENTEEN | The max password size will be 18 |
TWENTY | The max password size will be 20 |
Exception
Message | Code | Instance |
---|---|---|
Invalid Type | 400 | GenPasswordError |
Invalid Dimension | 400 | GenPasswordError |
License
Donate
Help me with this project: Donate Here
1.4.0
1 year ago
1.3.14
1 year ago
1.3.17
1 year ago
1.3.15
1 year ago
1.3.16
1 year ago
1.3.10
2 years ago
1.3.12
2 years ago
1.3.7
2 years ago
1.3.6
2 years ago
1.3.5
2 years ago
1.3.4
2 years ago
1.3.3
2 years ago
1.3.2
2 years ago
1.3.1
2 years ago
1.3.0
2 years ago
1.3.9
2 years ago
1.2.1
2 years ago
1.2.0
2 years ago
1.1.0
2 years ago
1.0.0
2 years ago
0.0.2
2 years ago
0.0.1
2 years ago