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 🙏

© 2026 – Pkg Stats / Ryan Hefner

faker-mini

v2.2.1

Published

Librería ultra liviana para generar datos falsos realistas.

Downloads

758

Readme

🚀 Faker Mini

License Node TypeScript PRs Version npm npm downloads bundle size

Librería ultra liviana para generar datos falsos realistas.
Sin dependencias, modular, con soporte de locales nativo y lista para Node.js y browser.


✨ Por qué usar Faker Mini

  • Ligero: Sin diccionarios de 50MB. Aprovechamos la API nativa de Intl.
  • 🧩 Modular: Solo importa lo que necesitas.
  • 🌍 Multilenguaje: Adaptación gramatical inteligente según el país.
  • 🔁 Seedable: Datos 100% reproducibles para testing estable.
  • 📦 Tree-shakeable: Diseño moderno basado en ES Modules.

📦 Instalación

npm install faker-mini

(También disponible vía pnpm add faker-mini o yarn add faker-mini)


🚀 Uso rápido

Utiliza el estándar mock para instanciar la librería en el idioma que prefieras:

import { createMock } from "faker-mini";

const mock = createMock({ locale: "es_AR", seed: 123 });

mock.person.fullName();   // "Juan Pérez"
mock.internet.email();    // "[email protected]"
mock.location.city();     // "Buenos Aires"
mock.phone.number();      // "+54 9 1234-5678"
mock.date.past();         // 2023-08-14T18:45:10.000Z
mock.id.uuid();           // "e4f8a3b2-7d1c-4e9f-8a2b-1c3d4e5f6a7b"

🧠 Generación de Datasets (Payloads masivos)

const mock = createMock({ locale: "en_US" });

// Puedes pasar una función constructora para mantener relación entre campos
const users = mock.dataset.generate(5, () => {
  const firstName = mock.person.firstName();
  const lastName = mock.person.lastName();

  return {
    id: mock.id.mongodb(),
    name: `${firstName} ${lastName}`,
    email: mock.internet.email({ firstName, lastName }),
    city: mock.location.city(),
    createdAt: mock.date.format(mock.date.recent(30), 'YYYY-MM-DD HH:mm:ss')
  };
});

console.log(users);

🌍 Locales disponibles

  • en_US (Inglés - Estados Unidos)
  • es_AR (Español - Argentina)
  • es_MX (Español - México)
  • es_ES (Español - España)
  • fr_FR (Francés - Francia)
  • de_DE (Alemán - Alemania)
  • pt_BR (Portugués - Brasil)
createMock({ locale: "es_MX" });

⚡ CLI Nativa

Genera datos desde tu terminal sin escribir código:

Generar datos simples

npx faker-mini person fullName
npx faker-mini internet email --locale es_MX
npx faker-mini location streetAddress --locale pt_BR

Generar archivos JSON masivos

npx faker-mini dataset --count 50 --out users.json

Esquema personalizado (CSV style)

npx faker-mini dataset \
  --count 10 \
  --schema id:id.short,nombre:person.firstName,email:internet.email \
  --out data.json

🧩 API de Módulos

mock.person

  • .gender()
  • .firstName(gender?)
  • .lastName()
  • .fullName()

mock.location

  • .city()
  • .country()
  • .zipCode(format?)
  • .street()
  • .streetAddress()
  • .latitude() / .longitude() / .coordinates()

mock.internet

  • .email({ firstName?, lastName?, format? }) // Limpia acentos y caracteres especiales automáticamente
  • .domain()
  • .tld()
  • .ipv4()

mock.phone

  • .number({ style: 'international' | 'national', format? })
  • .imei()

mock.date

  • .between(from, to)
  • .past(years?, refDate?)
  • .future(years?, refDate?)
  • .recent(days?, refDate?)
  • .birthdate({ minAge, maxAge })
  • .format(date, pattern)
  • .month(options?) / .weekday(options?) / .year(options?)

mock.id

  • .uuid()
  • .mongodb()
  • .short(length?)
  • .sequential() / .resetSequential(startValue?)

mock.helpers

  • .array(count, fn)
  • .object(schema)

mock.dataset

  • .generate(count, schemaOrFactory)

(👉 Visita la Documentación Completa para ver opciones avanzadas).


🔁 Reproducibilidad (Seed)

Ideal para que tus test unitarios o snapshots de frontend (Jest, Vitest) no se rompan entre ejecuciones.

const mock = createMock({ seed: 12345 });
mock.person.fullName(); // "Juan Pérez" hoy, mañana y siempre.

📌 Filosofía

Faker-Mini hace una sola cosa: generar datos falsos de forma simple, rápida y controlada.

Sin características sobredimensionadas. Sin dependencias de terceros. Diseñado para aprovechar la plataforma actual (V8/Node/Navegadores).


🤝 Contribuciones

¿Quieres agregar un módulo nuevo o un locale? ¡Los PRs son siempre bienvenidos!


📄 Licencia

MIT