Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@nudj/dummy

Package Overview
Dependencies
Maintainers
3
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nudj/dummy

Dummy data generator

  • 0.8.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
3
Created
Source

dummy

Dummy data generator

Usage

let dummy = require('@nudj/dummy')
let dummyData = dummy({
  cars: {
    schema: require('./car-schema.json'),
    count: 20
  }
})

...dummyData equals...

{
  cars: [
    { dummy car 1 },
    { dummy car 1 },
    ...
    { dummy car 19 },
    { dummy car 20 },
  ]
}

Schemas

An object where keys are mapped onto the dummy data objects. The values should be identifiers for casual generator functions or custom casual functions as defined in src/lib/generators.js.

Example

The name, phone and city generators are used below:

{                                         {
  name: 'name',                             name: 'Dave',
  phone: 'phone',       ...becomes...       phone: '01234567890'
  location: 'city'                          location: 'Chicago'
}                                         }

Keywords

FAQs

Package last updated on 20 Jun 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc