@robinpath/faker
0.1.0PublicFake data generation with seedable PRNG. Generates names, emails, addresses, lorem ipsum, numbers, dates, UUIDs, colors, IPs, and more. No external dependencies.
@robinpath/faker
Fake data generation with seedable PRNG. Generates names, emails, addresses, lorem ipsum, numbers, dates, UUIDs, colors, IPs, and more. No external dependencies.
Why use this module?
The faker module lets you:
- Set the random seed for reproducible fake data generation
- Generate a random full name
- Generate a random first name
- Generate a random last name
- Generate a random email address
All functions are callable directly from RobinPath scripts with a simple, consistent API.
Installation
npm install @robinpath/faker
Quick Start
No credentials needed — start using it right away:
faker.name
Available Functions
| Function | Description |
|---|---|
faker.seed | Set the random seed for reproducible fake data generation |
faker.name | Generate a random full name |
faker.firstName | Generate a random first name |
faker.lastName | Generate a random last name |
faker.email | Generate a random email address |
faker.phone | Generate a random phone number |
faker.address | Generate a random street address |
faker.city | Generate a random city name |
faker.country | Generate a random country name |
faker.zipCode | Generate a random zip code |
faker.company | Generate a random company name |
faker.lorem | Generate lorem ipsum text as words, sentences, or paragraphs |
faker.number | Generate a random integer within a range |
faker.float | Generate a random floating-point number within a range |
faker.boolean | Generate a random boolean value |
faker.date | Generate a random date within a range |
faker.uuid | Generate a random UUID v4 |
faker.pick | Pick a random element from an array |
faker.shuffle | Randomly shuffle an array using Fisher-Yates algorithm |
faker.paragraph | Generate a single random paragraph of lorem ipsum |
faker.sentence | Generate a single random sentence of lorem ipsum |
faker.word | Generate a single random lorem ipsum word |
faker.color | Generate a random color in hex, rgb, or name format |
faker.ip | Generate a random IP address |
faker.url | Generate a random URL |
faker.avatar | Generate a random avatar image URL |
Examples
Generate a random full name
faker.name
Generate a random first name
faker.firstName
Generate a random last name
faker.lastName
Integration with RobinPath
import { RobinPath } from "@wiredwp/robinpath";
import Module from "@robinpath/faker";
const rp = new RobinPath();
rp.registerModule(Module.name, Module.functions);
rp.registerModuleMeta(Module.name, Module.functionMetadata);
const result = await rp.executeScript(`
faker.name
`);
Full API Reference
See MODULE.md for complete documentation including all parameters, return types, error handling, and advanced examples.
Related Modules
@robinpath/json— JSON module for complementary functionality
License
MIT
Versions (1)
| Version | Tag | Published |
|---|---|---|
| 0.1.0 | latest | yesterday |
Related Modules
@dev-tester/hello-world
Updated description
@robinpath/apollo
Apollo module for RobinPath.
@robinpath/archive
Create and extract .zip and .tar.gz file archives
@robinpath/assert
Testing assertions: equal, deepEqual, truthy, falsy, type checks, includes, matches, throws, and more
$ robinpath install @robinpath/faker
