All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Corrected handling of array schemas in the factory function
- Added warning when
isSample
option is incorrectly used with array schemas
- Refactored
factory
function to use an options object for additional parameters. - Added
isSample
option to explicitly indicate when input should be treated as a sample. - Consolidated
factory
andfactoryFromSample
into a singlefactory
function. - Maintained backwards compatibility with previous API by supporting a number as the second argument for quantity.
factoryFromSample
function. Usefactory
withisSample: true
instead.
- Date inference in schema inference feature
- Support for 'date' and 'datetime' types in type generators
- Tests for date inference
- Updated
schemaInference.js
to handle date and datetime strings - Updated
typeGenerators.js
to include date and datetime generators
- Schema inference feature
- New
factoryFromSample
function to generate mock data from sample data - New
inferSchema
function to automatically generate schema from sample data - Support for nested object structures in schema inference
- Tests for schema inference feature, including nested objects
- Documentation for using schema inference
- Custom type definitions feature
- New
defineType(name, generator)
function to create custom types - Tests for custom type definitions
- Documentation for using custom type definitions
- Seeding mechanism to generate consistent data across different runs
- New
setSeed(seed)
function to set the seed for data generation - Tests for the new seeding feature
- Updated README.md with information about the new seeding feature
- Initial release of shujau-mock-factory
- Basic data generation functionality
- Support for various data types and nested structures
- Custom generator functions
- Unique integer generation
- Ability to reset unique integer counter
- N/A
- N/A
- N/A
- N/A
- N/A