piw-helper
v1.0.11
Published
Library untuk hashing password, compare password, dan generate UUID.
Readme
piw-helper
piw-helper is a helper library for javscript and typescript backend stack, with many feature.
Requirements
- NodeJS >= 18
Features
- Password hashing with 3 algorithms, default, sha256 and sha512.
- Comparing password with input.
- Create UUID for primary key or identity
- Email Validator
- Phone Number Validator
- more feature cooming soon
Instalation
Use npm to install piw-helper.
npm install piw-helperUsage
import { Hash, Compare, GenerateUUID, ValidateEmailFormat,ValidatePhoneNumberFormat} from "piw-helper";
Hash("foobar"); // string
// returning 'Apiiwu66l666l666y22z11i9994Dd.00Aa09Bb08CcDev'
Compare('Apiiwu66l666l666y22z11i9994Dd.00Aa09Bb08CcDev', 'foobar');
// returning boolean
GenerateUUID(); // string
// returning xNfEijEMYZedZnYAM2nkIJXrlJMaDE7kiJUzXMY8C8XH4hPYmcXJZi3EwdRn5QJm
ValidateEmailFormat("[email protected]"); // string
// returning boolean
ValidatePhoneNumberFormat("+6281913414241"); // string (start with country code or local number)
// returning booleanContributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
License
ChangeLog
v1.0.0
- Build With Javascript
v1.0.1
- Add GenerateUUID Function
v1.0.2
- Change Language from Javascript to Typescript
v1.0.3
- Fixing some issue and bugs
v1.0.4
- Add algorithm for hashing password (sha256 and sha512)
v1.0.5
- Trying commonJS (failed)
v1.0.6
- Add EmailValidator and PhoneNumberValidator Function
v1.0.7
- Fixing some issue and bugs
v1.0.8
- Switch import method from class to named exports
v1.0.9
- Fixing import method bug
v1.0.10
- Cleaning and Refactor some codes
v1.0.11 (now)
- Change some broken code
