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 🙏

© 2025 – Pkg Stats / Ryan Hefner

generadorpasswords

v1.0.1

Published

funcion para generar contraseñas aleatorias definiendo el numero de letras, cifras y caracteres especiales

Downloads

192

Readme

Generador de Passwords / Password Generator

Este archivo incluye ambas versiones del README: Español e Inglés.


🇪🇸 README en Español

Generador de Passwords

Una función muy sencilla para generar contraseñas personalizadas con el número de letras, números y/o caracteres especiales que se quiera.


Instalación

npm install generadorpasswords

Uso básico

const { generarPassword } = require("generadorpasswords");

Ejemplo con 5 letras, 3 números y 2 caracteres especiales:
// generarPassword(letras, numeros, especiales)
const password = generarPassword(5, 3, 2);

console.log(password);
// Ejemplo: "aT9!Bc7@s"

Parámetros de la función

| Parámetro | Tipo | Descripción | |---------------------|--------|---------------------------------------------------| | numberOfLetters | number | Cantidad de letras en la contraseña | | numberOfNumbers | number | Cantidad de números (0–9) | | numberOfSpecial | number | Cantidad de caracteres especiales (!, %, @, etc.) |


Ejemplos:

Solo letras

generarPassword(10, 0, 0);
// "aBcDeFgHiJ"

Letras + números

generarPassword(6, 4, 0);
// "aB3c9D1eF"

Contraseña completa

generarPassword(8, 4, 2);
// "Ab3!Cd7?eF4"

Notas

  • La función devuelve siempre un string.
  • Los caracteres de la contraseña se mezclan automáticamente.
  • Está diseñada para ser muy fácil de usar por principiantes.
  • No utiliza ninguna dependencia externa.

Autor

Miguel


🇬🇧 README in English

Password Generator

A very simple function to generate custom passwords with the desired number of letters, numbers, and/or special characters.


Installation

npm install generadorpasswords

Basic Usage

const { generarPassword } = require("generadorpasswords");

Example with 5 letters, 3 numbers and 2 special characters:
// generarPassword(letras, numeros, especiales)
const password = generarPassword(5, 3, 2);

console.log(password);
// Example: "aT9!Bc7@s"

Function Parameters

| Parameter | Type | Description | |---------------------|--------|--------------------------------------------------------| | numberOfLetters | number | Number of letters in the password | | numberOfNumbers | number | Number of digits (0–9) | | numberOfSpecial | number | Number of special characters (!, %, @, etc.) |


Examples

Letters only

generarPassword(10, 0, 0);
// "aBcDeFgHiJ"

Letters + numbers

generarPassword(6, 4, 0);
// "aB3c9D1eF"

Full password

generarPassword(8, 4, 2);
// "Ab3!Cd7?eF4"

Notes

  • The function always returns a string.
  • All characters are automatically shuffled.
  • It is designed to be very easy for beginners.
  • No external dependencies are used.

Author

Miguel