piccolotools
v1.1.2
Published
Simple, but epic tools!
Downloads
1
Readme
PiccoloTools
Simple, but epic tools!
Resources
Included tools
Password check: a simple password checker that makes sure a password is longer than or equal to 8 characters, has a number, and has a special character.
Documentation
Setup
Use this command to install:
npm i piccolotools
Recommended module variable: piccolo
Why? It's unique!
Final
const piccolo = require('piccolotools')
//Rest of code
Password check
Example usage:
const isMyPasswordStrong = piccolo.passwordCheck('thisismypassword')
If you log isMyPasswordStrong
to the console, you would get an array of two items.
[boolean, 'return code']
boolean
: Boolean for whether the password is strong or not.
'return code'
: The return code for what is wrong with the password.
Return codes:
|Code|Description|
|-|-|
|empty
|No password was sent to the module|
|tooshort
|Password is too short|
|nonum
|No number in the password|
|nospc
|No special character in the password|
|perfect
|Password is strong!|