UNPKG

@elgervb/mock-data

Version:

Mock data made easy, while maintaining type safety

18 lines 672 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var __1 = require(".."); var nrOfWheels = 4; // First register some blueprints (0, __1.register)('car', { brand: function () { return (0, __1.randomString)(3); }, color: function () { return (0, __1.randomHexColor)(); }, guid: __1.randomGuid, type: function () { return (0, __1.randomString)(4); }, wheels: function () { return (0, __1.arrayFrom)('wheel', nrOfWheels); }, }); (0, __1.register)('wheel', { inches: function () { return (0, __1.randomNumber)(2, 4); }, }); var mocks = (0, __1.arrayFrom)('car', 10); console.dir(mocks); //# sourceMappingURL=blueprints.js.map