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

Function moveHelperToHooks

lib/handlebars/helpers.js:19–27  ·  view source on GitHub ↗
(instance, helperName, keepHelper)

Source from the content-addressed store, hash-verified

17}
18
19export function moveHelperToHooks(instance, helperName, keepHelper) {
20 if (instance.helpers[helperName]) {
21 instance.hooks[helperName] = instance.helpers[helperName];
22 if (!keepHelper) {
23 // Using delete is slow
24 instance.helpers[helperName] = undefined;
25 }
26 }
27}

Callers 1

templateFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected