(options?: Options)
| 27 | import type { ErrorObject, Options, ValidateFunction } from 'ajv'; |
| 28 | |
| 29 | export const createAjv = (options?: Options) => { |
| 30 | const ajv = new Ajv({ |
| 31 | allErrors: true, |
| 32 | verbose: true, |
| 33 | strict: false, |
| 34 | addUsedSchema: false, |
| 35 | ...options, |
| 36 | }); |
| 37 | addFormats(ajv); |
| 38 | return ajv; |
| 39 | }; |
| 40 | |
| 41 | export const validate = ( |
| 42 | validator: ValidateFunction | undefined, |
no outgoing calls
no test coverage detected
searching dependent graphs…