chance-object
A Chance.js mixin to generate objects.
Install
NPM
$ npm i chance-object
Yarn
$ yarn add chance-object
Usage
;; const chance = ; chance; chanceobject;
By default, chance-object
will return a randomly generated object.
Example:
randomKey: 'randomValue';
chance-object
can also take an optional object as a parameter, which will create a randomly generated object and merge it with the supplied object.
Example:
chanceobject key: 'value';
Result:
randomKey: 'randomValue' key: 'value'
License
MIT © Michael Novotny