1.0.4 • Published 6 years ago

mock-jay v1.0.4

Weekly downloads
4
License
ISC
Repository
github
Last release
6 years ago

mockingJay

Mock real world data. Could be used as a single key/value or an array.

Install

$ npm i mock-jay

Usage

const mockingJay = require('mock-jay');


const person = {
	name : mockingJay("name"),
	age : mockingJay("age"),
	address : mockingJay("address")
}
//=> { name: 'Helen Drake', age: 31, address: '1869 Obpo Way' }

//array usage
const web = {
	ips : mockingJay(["ip", 5])
}
/*{ ips: 
        [ '186.48.247.180',
          '98.26.2.117',
          '68.149.95.82',
          '44.181.84.87',
          '101.132.104.177' ] } */

Note

This library uses Chance.js for data generation, hence all the types supported by it are supported by mockingJay.