jf

jazzon-faker

Generate fake data using faker

Showing:

Popularity

Downloads/wk

1

GitHub Stars

1

Maintenance

Last Commit

6yrs ago

Contributors

0

Package

Dependencies

1

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

jazzon-faker

Generate fake data using faker

Installation

$ npm install --save jazzon-faker

Usage

All methods in faker.js are supported using dot notaion.

let jazzon = require('jazzon');
let faker = require('jazzon-faker');
let json = {
  "id": "@{ random.uuid }",
  "name": "@{ name.findName }",
  "bio": "@{ lorem.sentences(3) }",
  "email": "@{ internet.email }"
};

jazzon
  .use(faker())
  .compile(json)
  .then(result => console.log(result));

/* Logs:  
 {
  "id": "7abd8062-217a-4ea7-a315-569642114293",
  "name": "Gerry Ankunding",
  "bio": "Suscipit ut atque.\nCorporis dolores officia ipsum cupiditate eius labore.\nAperiam porro ipsam cupiditate officia odit assumenda.",
  "email": "Cielo_Muller76@yahoo.com"
}
*/

Conflicting helper names

To avoid conflict with other helpers one can prefix all the mehods with "faker".

name.findName === faker.name.findName

Options

To set the locale of faker, supply the locale option to the plugin.

jazzon.use(faker({ locale: 'sv' }));

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial