MCPcopy
hub / github.com/thesysdev/openui / createParser

Function createParser

packages/lang-core/src/parser/parser.ts:668–675  ·  view source on GitHub ↗
(schema: LibraryJSONSchema, rootName?: string)

Source from the content-addressed store, hash-verified

666 * ```
667 */
668export function createParser(schema: LibraryJSONSchema, rootName?: string): Parser {
669 const paramMap = compileSchema(schema);
670 return {
671 parse(input: string): ParseResult {
672 return parse(input, paramMap, rootName);
673 },
674 };
675}
676
677/**
678 * Create a streaming parser from a library JSON Schema document.

Callers 1

Calls 1

compileSchemaFunction · 0.85

Tested by

no test coverage detected