MCPcopy Create free account
hub / github.com/TruthHun/BookStack / lazyRule

Function lazyRule

static/word2md/mammoth.browser.js:15051–15059  ·  view source on GitHub ↗
(ruleBuilder)

Source from the content-addressed store, hash-verified

15049
15050// TODO: move into a sensible place and remove duplication
15051var lazyRule = function(ruleBuilder) {
15052 var rule;
15053 return function(input) {
15054 if (!rule) {
15055 rule = ruleBuilder();
15056 }
15057 return rule(input);
15058 };
15059};
15060
15061},{"./parsing-results":115,"./rules":117}],112:[function(require,module,exports){
15062exports.error = function(options) {

Callers 1

createInfixRuleFunction · 0.70

Calls 1

ruleFunction · 0.70

Tested by

no test coverage detected