0.2.0 • Published 1 year ago

@automators/datamaker v0.2.0

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

DataMaker

License: MIT

What is it?

The official Node.js / Typescript library for the datamaker API. Datamaker assists with generating realistic relational data for testing and development purposes.

Installation

npm install @automators/datamaker

Quick start

Basic example:

import { DataMaker, Template } from "@automators/datamaker";

const datamaker = new DataMaker({
  apiKey: `YOUR_API_KEY`,
});

const generateData = async () => {
  const template = {
    name: "basic template",
    quantity: 2,
    fields: [
      {
        name: "first_name",
        type: "First Name",
      },
      {
        name: "last_name",
        type: "Last Name",
      },
      {
        name: "email",
        type: "Derived",
        options: {
          value: "{{first_name}}.{{last_name}}@automators.com",
        },
      },
    ],
  } satisfies Template;
  
  const data = await datamaker.generate(template);
  const result = await data.json();
  console.log(result);   
};

generateData();

Development & Contibutions

See the contributing.md guide for details on how to contribute to this project.

License

MIT

0.2.0

1 year ago

0.1.0

2 years ago

0.0.1

2 years ago