Skip to content

cicerotcv/blueprint

Repository files navigation

Blueprint

TypeScript Jest prettier GitHub license GitHub issues GitHub stars

Blueprint is a versatile random data generator inspired by the simplicity and power of Zod. With Blueprint, you can effortlessly create mock data for your applications, tests, or any other use case where realistic yet customizable data is needed.

Features

Easy-to-use syntax: Define your data structures with a simple and intuitive syntax, making it easy to generate data according to your specifications.

Flexible customization: Tailor your data generation with a wide range of options, including data types, constraints, and relationships between data fields.

Built-in data types: Blueprint supports a variety of common data types such as strings, numbers, dates, and more, allowing you to generate diverse datasets.

Extensible: Extend Blueprint with custom data types and generators to suit your specific requirements.

Installation

You can install Blueprint via npm:

npm install --save-dev @cicerotcv/blueprint

Using yarn

yarn add -D @cicerotcv/blueprint

Or pnpm

pnpm add -D @cicerotcv/blueprint

Usage

import { b } from '@cicerotcv/blueprint';

const objectSchema = b.schema({
  age: b.integer.between({
    min: 0,
    max: 10,
  }),
});

const array = b.array({
  length: 3,
  schema: objectSchema,
});

console.log(array.generate());
// [{ age: 2 }, { age: 3 }, { age: 5 }]

Contributing

Contributions are welcome! Please see our contribution guidelines for more information on how to get involved.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

Blueprint draws inspiration from Zod. We are grateful to the contributors of Zod for their fantastic work.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published