A nodejs client for generating data using the rest api from http://mockaroo.com
npm install mockaroo
The mockaroo client's generate method returns a promise that resolves to an array of records.
You can either generate data using a schema that you've built and saved on mockaroo.com:
var Mockaroo = ;var client =apiKey: 'e93db400' // see to get your api keyclient;
Or you can specify fields using the API:
Field types and parameters are documented here
You can also download data in csv format:
The Promise returned by client.generate resolves to an array of records when count > 1 and a single object when count == 1. The keys are the names of the fields in your schema. For example:
This module contains Error classes to help you handle specific error conditions.
To generate documentation and compile the es6 code to js, use the default gulp task:
This module uses mocha and chai for testing. To run tests: