UNPKG

typebox-schema-faker

Version:

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

9 lines (8 loc) 249 B
import { rootFake } from '../root'; import { unwrap } from '../unwrap'; /** * Generates fake data for readonly schemas */ export const fakeReadonly = (schema, ctx, options) => { return Object.freeze(rootFake(unwrap(schema), ctx, options)); };