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

strong-password-generator

v1.0.6

Published

Strong Password Generator is a utility module which provides straight-forward, powerful password generation function.

Downloads

682

Readme

strong-password-generator

Strong Password Generator is a utility module which provides straight-forward, powerful password generation function.

Installation

To install strong-password-generator, use npm:

npm install strong-password-generator

Usage

using default configurations

var strongPaswordGenerator = require("strong-password-generator");

strongPaswordGenerator.generatePassword();
// >> "cWst77snJtVris"

providing own configurations

var strongPaswordGenerator = require("strong-password-generator");
var defaultPasswordConfig = {
  base: 'WORD',
  length: {
    min: 12,
    max: 16
  },
  capsLetters: {
    min: 3,
    max: 3
  },
  numerals: {
    min: 2,
    max: 2
  },
  spacialCharactors: {
    includes: [],
    min: 0,
    max: 0
  },
  spaces: {
    allow: false,
    min: 0,
    max: 0
  }
};

strongPaswordGenerator.generatePassword(defaultPasswordConfig); // defaultPasswordConfig optional
// >> "cWst77snJtVris"

get default configurations

var strongPaswordGenerator = require("strong-password-generator");

strongPaswordGenerator.getDefaultConfig();
// >> {
  base: 'WORD',
  length: {
    min: 12,
    max: 16
  },
  capsLetters: {
    min: 3,
    max: 3
  },
  numerals: {
    min: 2,
    max: 2
  },
  spacialCharactors: {
    includes: [],
    min: 0,
    max: 0
  },
  spaces: {
    allow: false,
    min: 0,
    max: 0
  }
}

API

strong-password-generator.

  • generatePassword(options) - options [OPTIONAL]

    • base - describe the way that password text populated [REQUIRED]
      • WORD - from random word for given length
      • RANDOM - from a totaly random text for given length
    • length - length of the password [REQUIRED]
      • min - minimum length of the password
      • max - maximum length of the password
    • capsLetters - number of capital letters needs to be included within the password [REQUIRED]
      • min - minimum number of captital letters for the password
      • max - maximum number of captital letters for the password
    • numerals - number of numerals needs to be included within the password [REQUIRED]
      • min - minimum number of numerals for the password
      • max - maximum number of numerals for the password
    • spacialCharactors - details of the speacial charactors needs to be included within the password [REQUIRED]
      • includes - list of special charactors used to generate password
      • min - minimum number of special charactors for the password
      • max - maximum number of special charactors for the password
    • spaces - details of the spaces needs to be included within the password [REQUIRED]
      • allow - specify whether password includes spaces or not
      • min - minimum number of spaces for the password
      • max - maximum number of spaces for the password
  • getDefaultConfig() - to get default configurations