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

strongpassword

v1.1.4

Published

Check if the password is strong.

Downloads

7

Readme

StrongPassword

NPM version Downloads Build Status Coveralls Status Codecov Status

Check if the password is strong.

Here an example of a strong password check:

var strongPasswordValidation = new StrongPassword({
    password: 'This is 1 strong password!',
    locale:   'en_US'
});

console.log(strongPasswordValidation.isStrong);

Here an example of a weak password check:

var strongPasswordValidation = new StrongPassword({
    password: 'Not strong',
    locale:   'en_US'
});

console.log(strongPasswordValidation.isStrong);
console.log(strongPasswordValidation.reason);

Params

  • password
  • locale ('en_US')
  • minimumLength (10)
  • minimumWords (4)
  • numbers (true)
  • lowercase (true)
  • uppercase (uppercase)
  • dictionaries (typo/dictionaries)
  • specials (/[,.?!]/g)

Only the password param is required. For the other params you see the default value in the list.

locale

With this param you can set the dictionary for the words. This will check if you only use normal words, so you can remember it.

minimumLength

With this param you can set the minimum length of the password. The default length is a total of 10 chars, including spaces.

minimumWords

With this param you can set the minimum words in the password. The default length is a total of 4 words, so the password is long, and not easy to guess.

numbers

With this param you can set that the password must have a number.

lowercase

With this param you can set that the password must have a alphabetical lowercase char.

uppercase

With this param you can set that the password must have a alphabetical uppercase char.

dictionaries

You can add another dictionary than en_US.

specials

You can define the specials that will be ignored in the words.

Test the package.

npm test

This will run all the tests in the test folder with mocha.

If you only want to check the eslint rules, just run.

npm run lint

node.js

To include strongpassword in Node, first install with npm.

npm install strongpassword

Use the package in your node files.

require('strongpassword');