faker-generator
v1.0.1
Published
<div align="center"> <h1> <br/> faker-generator <br/> <br/> </h1>
Downloads
4
Readme
Install
npm install --save faker-generator
Usage
const generator = require('faker-generator'); // es5
// import generator from 'faker-generator'; for es6
const schema = {
name: "{{name.firstName}} {{name.lastName}}",
address: "{{address.cityPrefix}} {{address.citySuffix}}",
state: "{{address.state}}",
phone: "{{phone.phoneNumber}}",
imageUrl: "{{image.people}}",
email: "{{internet.email}}",
}
const data = generator(schema, 20, 20)
console.log(data)
Documentation
generator(schema, min, max);
- params
- schema: object (required)
- min & max: number
- generate minimum and maximum length of array
License
MIT © irhamputra