MCPcopy Create free account
hub / github.com/clayrisser/create-react-renderer / constructor

Method constructor

phaseJ/src/elements/Smart.ts:34–50  ·  view source on GitHub ↗
(props: Props, parserOptions: ParserOptions = {})

Source from the content-addressed store, hash-verified

32 constructor(props: Props, parserOptions: ParserOptions = {}) {
33 const baseNode = template.smart(
34 props.code,
35 _.merge(parserOptions, props.options) as TemplateBuilderOptions,
36 )(props.replacements as PublicReplacements);
37 const scopePath = flattenPath(props.scopePath);
38 super(props.scopePath && scopePath.length ? _.get(baseNode, scopePath) : baseNode, props, {
39 bodyPath: props.bodyPath || "body.body",
40 parentBodyPath: props.parentBodyPath,
41 });
42 }
43}

Callers

nothing calls this directly

Calls 1

flattenPathFunction · 0.90

Tested by

no test coverage detected