MCPcopy
hub / github.com/handlebars-lang/handlebars.js / transformLiteralToPath

Function transformLiteralToPath

lib/handlebars/compiler/compiler.js:580–594  ·  view source on GitHub ↗
(sexpr)

Source from the content-addressed store, hash-verified

578}
579
580function transformLiteralToPath(sexpr) {
581 if (!sexpr.path.parts) {
582 let literal = sexpr.path;
583 // Casting to string here to make false and 0 literal values play nicely with the rest
584 // of the system.
585 sexpr.path = {
586 type: 'PathExpression',
587 data: false,
588 depth: 0,
589 parts: [literal.original + ''],
590 original: literal.original + '',
591 loc: literal.loc
592 };
593 }
594}

Callers 1

compiler.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected