fakergen
v1.1.0
Published
generate fake & reasonable data that can be used during development
Downloads
4
Maintainers
Readme
fakergen
generate fake & reasonable data that can be used during development
Install
npm install fakergen --save-dev
Usage
import Faker from 'fakergen' // or
// const gen =require('fakergen').create();
const gen=Faker.create();// create new generator
gen.get('fullname'); // exp: Walsh Lachlan
gen.get('fullname',{middle:true,type:'female'}); // exp: Aretha Q Testway
gen.get('address'); // exp: 693 Elit Ct Avenue New York, PR 91927-8461
API
Faker.create()
create new generator instance to use it with get()
get(param, [options])
param
Type: string
given provider it can be one of the following :
- fullname
- gender
- birth
- address
- street
- state
- city
- zipcode
- building
options
Type: object
middle
Type: boolean
include middle in the fullname
// exp :Mercy H Noteware
Faker.create().get('fullname',{middle:true})
type
Type: string
choose male or female (default male)
// exp :Maybelle Byfield
Faker.create().get('fullname',{type:"female"})
License
MIT © abdelhak akermi