npm.io
15.5.1 • Published 6 years ago

@the-/seed

Licence
MIT
Version
15.5.1
Deps
4
Size
32 kB
Vulns
0
Weekly
0
Stars
5

@the-/seed

npm Version

Data generator for the-db

Installation

$ npm install @the-/seed --save

Usage

'use strict'

const theSeed = require('@the-/seed')

async function tryExample() {
  const seed = theSeed('ja', {
    vars: {
      /* ... */
    },
  })
  const users = seed.explode(
    {
      name: '#{name.firstName()}',
    },
    100,
  )

  console.log(users) // -> [ username: 'xxxxx', /* ... */ ]
}

tryExample().catch((err) => console.error(err))

API Guide

See API Guide for more detail

License

This software is released under the MIT License.

Keywords