1.0.0 • Published 3 years ago

jenerator-js v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

jenerator-js

Build Status Coverage Status

Creates random instances of objects.

Minimum and easy library to generate instances of objects in javascript. No dependencies. All

  • Supports the generation of objects with numeric and string values.
  • Supports the generation of constant fields.
  • Supportsd the random pick between a set of different items with randomFrom.

As simple as:

MockBuilder(10, {
    id: id(),
    a: randomNumber(0, 10000),
    b: {
      c: randomNumber(0, 300),
      d: randomString()
    },
    e: 4,
    f: null,
    g: randomFrom(["u", 6, "juja"])
  });

See working example in Codesandbox

For a more powerful library you can take a look into falso

1.0.0

3 years ago

0.3.0

3 years ago

0.2.0

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago