0.1.0 • Published 6 years ago

tiny-password-strength v0.1.0

Weekly downloads
62
License
MIT
Repository
github
Last release
6 years ago

NPM Version Build Status Code Coverage NPM Downloads

Tiny Password Strength

The smallest library for password strength checking

Installation

yarn add tiny-password-strength

Why?

Because the Dropbox library for that that we have been using was almost 1MB large, and that was causing the compiled bundle to be very very very very larger than it should be. So, we've implemented almost the same feature in 38 lines.

Usage

import strength from 'tiny-password-strength'

const { meterClass, meterMessage } = strength('Eita-Preula')
// { meterClass: 'good', meterMessage: 'Nice one!' }

The possible classes are no-password, worst, bad, weak, good and strong.