npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ng-password-strength

v0.3.0

Published

ng-password-strength

Downloads

945

Readme

ng-password-strength

Password strength checker wrapped in an angular directive Based on:

Examples

See app/index.html in the respository. [Live example] [live-example] [live-example]: http://subarroca.github.io/ng-password-strength/

Usage

  1. Bower should add ng-password-strength.min.js to you main file (index.html)

you can download this by:

In your web page:

<script src="ng-password-strength/dist/scripts/ng-password-strength.js"></script>
<script src="lodash/lodash.js"></script>
  1. Bower should add ng-password-strength to your main file (index.html). Some of them are not automatically added so you'd better check them.
<script src="bower_components/angular/angular.js"></script>
<script src="bower_components/lodash/lodash.js"></script>
<script src="bower_components/ng-password-strength/dist/ng-password-strength.js"></script>
  1. Set ng-password-strength as a dependency in your module
var myapp = angular.module('myapp', ['ngPasswordStrength'])
  1. Add ng-password-strength directive to the wanted element, example:
<div ng-password-strength="pass"> .... </div>
  • Accepted addtional params:

    • strength: value returned [0-100]

    • css-mode: 'foundation' or 'bootstrap'. Sets inner-class, inner-class-prefix, outter-class-prefix. No need to set one by one

    • inner-class: inner bar class (i.e. 'progress-bar')

    • inner-class-prefix: inner bar class prefix (i.e. 'progress-bar-' => 'progress-bar-success')

    • outter-class-prefix: root element class prefix (i.e. 'progress-bar-' => 'progress-bar-success')

    • calculation-mode: 'formula' (default) or 'entropy'. Formula is explained below

    • goal: only used in entropy mode. Fixes the amount to reach. Default: 96

Formula

Values limited to [0-100]

  • Pros:

    • Number of Characters + n*4
    • Uppercase Letters (if any uppercase) + (len-n)*2
    • Lowercase Letters (if any lowercase) + (len-n)*2
    • Numbers (if any letter) + n*4
    • Symbols + n*6
    • Middle Numbers or Symbols + n*2
    • Requirements + n*2
  • Cons:

    • Letters Only - n
    • Numbers Only - n
    • Repeat Characters (Case Insensitive) - (n/len) *10
    • Consecutive Uppercase Letters - n*2
    • Consecutive Lowercase Letters - n*2
    • Consecutive Numbers - n*2
    • Sequential Letters (3+) - n*3
    • Sequential Numbers (3+) - n*3
    • Sequential Symbols (3+) - n*3

TODO

Create tests

Changelog

v0.3.0

  • formula calculation moved to factory
  • added entropy calculation in a new factory
  • template moved to detached html

v0.2.0

  • added dependency: lodash
  • removed dependencies: bootstrap, ng-lodash
  • added classes for further customization
  • added modes for faster customization: [foundation, bootstrap]

v0.1.0

  • added dependency: ng-lodash
  • removed dependencies: underscore.string
  • changed compass to node-sass

v0.0.8

  • lodash update

v0.0.7

  • strength value feedback

v0.0.6

  • change underscore to lodash

v0.0.1

  • formula-based value calculations