MCPcopy Index your code
hub / github.com/xaboy/form-create / getParser

Function getParser

packages/core/src/handler/context.js:58–69  ·  view source on GitHub ↗
(ctx)

Source from the content-addressed store, hash-verified

56 }
57 },
58 getParser(ctx) {
59 const list = this.fc.parsers;
60 const renderDriver = this.fc.renderDriver;
61 if (renderDriver) {
62 const parsers = renderDriver.parsers || {};
63 const parser = parsers[ctx.originType] || parsers[toCase(ctx.type)] || parsers[ctx.trueType];
64 if (parser) {
65 return parser;
66 }
67 }
68 return list[ctx.originType] || list[toCase(ctx.type)] || list[ctx.trueType] || BaseParser;
69 },
70 bindParser(ctx) {
71 ctx.setParser(this.getParser(ctx));
72 },

Callers

nothing calls this directly

Calls 1

toCaseFunction · 0.85

Tested by

no test coverage detected