faker-create-factory
🏭 Factory creator utility to Faker.js
Installing
yarn add faker faker-create-factory # If you're using NPM: # npm install faker faker-create-factory
Basic Usage
; ; // And the use it as:UserFactory.generate; // UserUserFactory.generateMany5; // Array<User>
If needed, you can override the default schema:
; ; // Plain object:Factory.generate; // With a faker instance:Factory.generateMany5,;
The two options (plain object and with a faker instance) described above are available in both generate
and generateMany
methods.
Authors and License
lffg and contributors.
MIT License, see the included MIT file.