1.4.0 • Published 1 year ago

@mineot/gen_password v1.4.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

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

TypesDescription
ONLY_NUMBERSThe password will only contain numbers
ONLY_ALPHASThe password will only contain characters
ALPHA_NUMERICThe password will contain characters and numbers
COMPLEXThe password will contain characters, numbers and this special chars

Dimension Enum

DimensionsDescription
FOURThe max password size will be 04
SIXThe max password size will be 06
EIGTHThe max password size will be 08
TENThe max password size will be 10
TWELVEThe max password size will be 12
FOURTEENThe max password size will be 14
SIXTEENThe max password size will be 16
EIGHTEENTEENThe max password size will be 18
TWENTYThe max password size will be 20

Exception

MessageCodeInstance
Invalid Type400GenPasswordError
Invalid Dimension400GenPasswordError

License

MIT 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