@abhay557/fakedata
v1.1.0
Published
A versatile mock data and fun content generator including users, credit cards, jokes, anime quotes, and animal facts.
Downloads
914
Maintainers
Readme
fakedata
A high-performance, zero-dependency mock data generation engine for Node.js. Designed for testing, prototyping, and local development.
Overview
fakedata is a utility library that provides a structured API for generating high-quality synthetic data in JavaScript.
Core Modules:
- Data: Professional-grade PII, addresses, and enterprise resumes.
- Fun: Pokemon stats, jokes, facts, and fortune cookies.
- Anime: Curated quotes and trivia from iconic series.
- Animals: Biological facts and random animal profiles.
Node.js Implementation
Installation
npm install @abhay557/fakedataQuick Start
const fakedata = require('@abhay557/fakedata');
// Generate a random user profile
const user = fakedata.data.user();
console.log(`Name: ${user.fullName} | City: ${user.address.city}`);
// Fetch a random Pokemon
const poke = fakedata.fun.pokemon();
console.log(`Random Pokemon: ${poke.name} (${poke['Type 1']})`);API Reference
| Namespace | Method | Description |
| :--- | :--- | :--- |
| data | user() | Full identity profile (Name, Address, Job, Bank, Hobbies, Tech Profile). |
| data | users(n) | Returns an array of n unique user profiles. |
| data | creditcard() | Realistic credit card data (Number, Expiry, CVV). |
| fun | pokemon() | Random Pokemon with stats and types. |
| fun | joke() | Random joke across various categories. |
| anime | quote() | Iconic anime quotes with character attribution. |
| anime | quotes_by_show(s) | Filtered quotes from a specific show. |
| animals | random_animal() | Random animal profile and interesting facts. |
Why use fakedata?
- Optimized for Speed: Datasets are pre-loaded or efficiently indexed for rapid generation of large datasets.
- Rich Datasets: Bundled with comprehensive JSON assets, no internet connection required.
Contributing
Contributions are welcome! If you'd like to add new datasets or modules:
- Ensure changes are implemented in
src/. - Maintain naming parity for methods and JSON keys.
- Submit a Pull Request.
License
Distributed under the MIT License. See LICENSE for more information.
Maintainer: abhay557
- Project Commit History -
https://github.com/abhay557/random-api.xyz
