1.4.0 • Published 3 years ago
@mineot/gen_password v1.4.0
GenPassword
Generate Password API, is a easy way to generate passwords
Install
npm i @mineot/gen_passwordUse
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
3 years ago
1.3.14
3 years ago
1.3.17
3 years ago
1.3.15
3 years ago
1.3.16
3 years ago
1.3.10
3 years ago
1.3.12
3 years ago
1.3.7
3 years ago
1.3.6
3 years ago
1.3.5
3 years ago
1.3.4
3 years ago
1.3.3
3 years ago
1.3.2
3 years ago
1.3.1
3 years ago
1.3.0
3 years ago
1.3.9
3 years ago
1.2.1
4 years ago
1.2.0
4 years ago
1.1.0
4 years ago
1.0.0
4 years ago
0.0.2
4 years ago
0.0.1
4 years ago