https://github.com/catvec/data-generator
A quick script to generate large amounts of test data
https://github.com/catvec/data-generator
Last synced: 7 months ago
JSON representation
A quick script to generate large amounts of test data
- Host: GitHub
- URL: https://github.com/catvec/data-generator
- Owner: catvec
- License: mit
- Created: 2017-08-21T19:51:48.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-11-29T03:48:00.000Z (over 8 years ago)
- Last Synced: 2025-05-04T01:02:13.024Z (11 months ago)
- Language: JavaScript
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Data Generator
A quick script to generate large amounts of test data. Takes advantage of two already existing random data generation libraries, [Chance.js](http://chancejs.com/) and [Faker.js](https://github.com/FotoVerite/Faker.js), to actually create the data.
# Usage
Usage: `node genSchemas.js `
Run the `genSchemas.js` file with one positional command line argument for the data category. This value tells the
program the theme of the test data to generate.
Avliable categories:
- location
- user
- web
# Defining Your Own Categories
In the `genSchemas.js` file there is a object named `items`. This object holds numerous keys, each which then hold an
array of keys themselves.
Each of the object keys is a category name. The user specifies which category to use via the command line interface. The keys in the arrays are [Chance.js](http://chancejs.com/)
or [Faker.js](https://github.com/FotoVerite/Faker.js) keys. Although you will find some do not work due to a downstream library issue.