Fluent FakerJS is a module built on top of FakerJS to help you write fake date using a fluent api.
yarn add fluentfaker --dev
// or
npm install fluentfaker --save-dev
Build JSON Object.
import FluentFaker from 'fluentfaker'
const object = FluentFaker.make()
.rule('name', rule => rule.name.findName())
.rule('email', rule => rule.internet.email())
.rule('jobtitle', rule => rule.name.jobTitle())
.build();
Build Form Data
import FluentFaker from 'fluentfaker'
const object = FluentFaker.make()
.rule('name', rule => rule.name.findName())
.rule('email', rule => rule.internet.email())
.rule('jobtitle', rule => rule.name.jobTitle())
.buildAsFormData();
Visit FakerJS page to get more details about all methods that can be used in Fluent Faker rules.
yarn
yarn test
Fluent FakerJS uses typescript and yarn, you just need run yarn
to install dependencies and you're welcome to fix a bug or add a new feature.
Feel free to open a issue or send a pull request.