- Created just for learn and pratices
- Typescript
- Lodash
- Functional Programming
yarn add @notillew/password-strength
npm install @notillew/password-strength
yarn test
yarn test:watch
import passwordStrength from '@notillew/password-strength'
expect(passwordStrength(passwordWeak)).toBe('weak')
expect(passwordStrength(passwordMedium)).toBe('medium')
expect(passwordStrength(passwordStrong)).toBe('strong')
- Length
- Uppercase and lowercase
- Special characters
- Sequences, like: 123, abc, abc123, a1b2c3 and beyond will decrease password level strength
Score should be 0 to 10
< 4 weak
>= 4 medium
>= 8 Strong