@elgervb/mock-data
v1.0.3
Published
Mock data made easy, while maintaining type safety
Downloads
30
Maintainers
Readme
MOCK-DATA
Mock data made easy, while maintaining type-safety and reducing boilerplate code.
Examples
Simple random models:
examples/random.ts
npx ts-node ./src/examples/random.ts
Output:
{
active: false,
created: 1986-11-29T23:00:00.000Z,
id: '99c06715-f119-45f6-8544-01ca94bed5ff',
name: 'VZxYf1x5w4'
}
Register blueprints:
examples/blueprints.ts
npx ts-node ./src/examples/blueprints.ts
Output:
[
{
brand: 'XCSLNHDjQS',
color: 'J7VfZvbLpO',
guid: 'c4027a22-faf3-4168-9bc4-a1bb11c78fdc',
type: 'rQI3EoILRW',
wheels: [ [Object], [Object], [Object], [Object] ]
},
{
brand: '6cbBqZZD3J',
color: 'UJu4RwwYkt',
guid: 'b5b6b810-7dd2-4afe-8765-95ab6ce5529d',
type: 'LBIdfIFmZ9',
wheels: [ [Object], [Object], [Object], [Object] ]
},
...