2.2.3 • Published 2 years ago
mg_faker v2.2.3
Fake User Generator
This is a simple JavaScript module for generating fake user data using Faker.js.
Installation
- Make sure you have Node.js installed on your machine.
- Install Faker.js by running:
npm install @faker-js/faker
- Include the
generateFakeUsers
function in your project.
Usage
The generateFakeUsers
function generates fake user data based on the specified model.
Function Signature
import { generateFakeUsers } from "mg_faker";
const numberOfUsers = 5;
const userFieldsModel = {
firstName: "person.firstName",
lastName: "person.lastName",
email: "internet.email",
avatar: "image.avatar",
address: "location.streetAddress",
};
const generatedUsers = generateFakeUsers(numberOfUsers, userFieldsModel);
console.log(generatedUsers);