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

generate-pass

v1.2.2

Published

generate password uniqued

Downloads

2

Readme

Indice

  1. Spanish
  2. English

Generate Pass

Random password generator customizable between the types of data used.

Install

$ npm install generate-pass --save

Usage

generatePass(min, max, type)

Generates a password from the parameters sent, all are optional, so it can be used without sending any, but they remain enabled, it returns a string.

const { generatePass } = require('generate-pass');

const password = generatePass();

console.log(password);
//hlxXF7Aa

//--------------------------------------------

const password2 = generatePass(10, 30, 3);

console.log(password2)
//4Ss02Tx2mS5tmVEUl$467C57w/VD

Available options

| Name | Description | Defect Value | |---------------------|------------------------------------------------------------|----------------| | min | Integer, minimum password length. | 8 | | max | Integer, maximum password length. | 20 | | type | Integer, defines the type of data used for the password. | 2 |

Note: type only contains options: 0, 1, 2, 3. |type | Description | |------|---------------------------------------------------| |0 | only use of letters lower | |1 | only use of letters upper | |2 | Use of letters and numbers | |3 | Use of letters, numbers and special characters |

validatePass(min, max, type, pass)

validate the password with the formated (see table)

const { validatePass } = require('generate-pass');

const status = validatePass(8, 20, 3, 'aG5jdjh53');

console.log(status);
//the formate the password is ok

//--------------------------------------------

const status2 = validatePass(8, 20, 0, 'aG5jdjh53');

console.log(status2)
//the formate isn't correct

Parametros permitidos

| Name | Description | Defect Value | |---------------------|------------------------------------------------------------|----------------| | min | Integer, minimum password length. | 8 | | max | Integer, maximum password length. | 20 | | type | Integer, defines the type of data used for the password. | 2 | | pass | String, the password. | '' |

Note: type only contains options: 0, 1, 2, 3. |type | Description | |------|---------------------------------------------------| |0 | only use of letters lower | |1 | only use of letters upper | |2 | Use of letters and numbers | |3 | Use of letters, numbers and special characters |

Generador de contraseñas

Generador de contraseñas de manera aleatorias personalizable entre los tipos de datos usados.

Instalación

$ npm install generate-pass --save

Uso

generatePass(min, max, type)

Genera una contraseña a apartir de los parametros enviados, todos son opcionales, asi que se puede usar sin enviar alguno, pero quedan habilitados, retorna un string.

const { generatePass } = require('generate-pass');

const password = generatePass();

console.log(password);
//hlxXF7Aa

//--------------------------------------------

const password2 = generatePass(10, 30, 3);

console.log(password2)
//4Ss02Tx2mS5tmVEUl$467C57w/VD

Parametros permitidos

| Nombre | Descripción | Valor por defecto | |---------------------|---------------------------------------------------------------|-------------------| | min | Integer, longitud mínima de la contraseña. | 8 | | max | Integer, longitud máxima de la contraseña. | 20 | | type | Integer, define el tipo de datos usados para la contraseña. | 2 |

Nota: type solo contiene opciones de: 0, 1, 2, 3. |type | Descripción | |------|-------------------------------------------------| |0 | Solo uso de letras minusculas | |1 | Solo uso de letras mayusculas | |2 | Uso de letras y números | |3 | Uso de letras, números y caracteres especiales |

validatePass(min, max, type, pass)

Valida la contraseña enviada en los parametros, verificando si cumple con el formato especificado (vease el cuadro de abajo).

const { validatePass } = require('generate-pass');

const status = validatePass(8, 20, 3, 'aG5jdjh53');

console.log(status);
//the formate the password is ok

//--------------------------------------------

const status2 = validatePass(8, 20, 0, 'aG5jdjh53');

console.log(status2)
//the formate isn't correct

Parametros permitidos

| Nombre | Descripción | Valor por defecto | |---------------------|---------------------------------------------------------------|-------------------| | min | Integer, longitud mínima de la contraseña. | 8 | | max | Integer, longitud máxima de la contraseña. | 20 | | type | Integer, define el tipo de datos usados para la contraseña. | 2 | | pass | String, contraseña. | '' |

Nota: type solo contiene opciones de: 0, 1, 2, 3. |type | Descripción | |------|-------------------------------------------------| |0 | Solo uso de letras minusculas | |1 | Solo uso de letras mayusculas | |2 | Uso de letras y números | |3 | Uso de letras, números y caracteres especiales |