UNPKG

typebox-schema-faker

Version:

Generate fake data from TypeBox schemas for testing, prototyping and development.

11 lines (10 loc) 275 B
import { rootFake } from '../root'; /** * Generates fake data for function schemas */ export const fakeFunction = (schema, ctx, options) => { const returnSchema = schema.returns; return (..._args) => { return rootFake(returnSchema, ctx, options); }; };