fakergen
    TypeScript icon, indicating that this package has built-in type declarations

    1.1.0 • Public • Published

    fakergen

    NPM Version Coverage Status Build Status License

    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

    Install

    npm i fakergen

    DownloadsWeekly Downloads

    2

    Version

    1.1.0

    License

    MIT

    Last publish

    Collaborators

    • darvour