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.
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.
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
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 }]
Contributions are welcome! Please see our contribution guidelines for more information on how to get involved.
This project is licensed under the MIT License - see the LICENSE file for details.
Blueprint draws inspiration from Zod. We are grateful to the contributors of Zod for their fantastic work.