Skip to content

luisfarzati/json-chance

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

json-chance

NPM version NPM downloads Build Status Dependency Status Donations

Create random JSON objects using json-spawn and Chance.js.

Node

var jsonChance = require('json-chance')

jsonChance('guid,name,profile(url,twitter,fbid)')

// returns
//	{
//	 "guid": "55585f1d-aedf-50ef-9436-3cbeb3e76afc",
//	 "name": "William McCoy",
//	 "profile": {
//	  "url": "http://bim.gov/du",
//	  "twitter": "@nijgu",
//	  "fbid": 1000053597266623
//	 }
//	}

CLI

$ jsonchance 'guid,name,profile(url,twitter,fbid)'

{
  "guid": "55585f1d-aedf-50ef-9436-3cbeb3e76afc",
  "name": "William McCoy",
  "profile": {
	  "url": "http://bim.gov/du",
      "twitter": "@nijgu",
      "fbid": 1000053597266623
	}
}

Installation

$ npm install json-chance

Tests

$ npm test
$ npm run coverage

License

MIT

About

Create random JSON objects using json-spawn and Chance.js

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published