MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / getAjv

Function getAjv

packages/kernel/core/src/json-schema.ts:23–34  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

21let ajvInstance: Ajv2020 | undefined;
22
23const getAjv = (): Ajv2020 => {
24 if (ajvInstance === undefined) {
25 ajvInstance = new Ajv2020({
26 allErrors: true,
27 strict: false,
28 validateSchema: false,
29 allowUnionTypes: true,
30 });
31 addFormats(ajvInstance);
32 }
33 return ajvInstance;
34};
35
36const decodePointerSegment = (segment: string): PropertyKey => {
37 const decoded = segment.replaceAll("~1", "/").replaceAll("~0", "~");

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected