mock-jay

1.0.4 • Public • Published

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.

Dependencies (1)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i mock-jay

    Weekly Downloads

    0

    Version

    1.0.4

    License

    ISC

    Unpacked Size

    2.96 kB

    Total Files

    4

    Last publish

    Collaborators

    • arbazsiddiqui