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

Function genDirectives

static/vuejs/vue.esm.js:8694–8717  ·  view source on GitHub ↗
(el)

Source from the content-addressed store, hash-verified

8692}
8693
8694function genDirectives (el) {
8695 var dirs = el.directives;
8696 if (!dirs) { return }
8697 var res = 'directives:[';
8698 var hasRuntime = false;
8699 var i, l, dir, needRuntime;
8700 for (i = 0, l = dirs.length; i < l; i++) {
8701 dir = dirs[i];
8702 needRuntime = true;
8703 var gen = platformDirectives$1[dir.name] || baseDirectives[dir.name];
8704 if (gen) {
8705 // compile-time directive that manipulates AST.
8706 // returns true if it also needs a runtime counterpart.
8707 needRuntime = !!gen(el, dir, warn$3);
8708 }
8709 if (needRuntime) {
8710 hasRuntime = true;
8711 res += "{name:\"" + (dir.name) + "\",rawName:\"" + (dir.rawName) + "\"" + (dir.value ? (",value:(" + (dir.value) + "),expression:" + (JSON.stringify(dir.value))) : '') + (dir.arg ? (",arg:\"" + (dir.arg) + "\"") : '') + (dir.modifiers ? (",modifiers:" + (JSON.stringify(dir.modifiers))) : '') + "},";
8712 }
8713 }
8714 if (hasRuntime) {
8715 return res.slice(0, -1) + ']'
8716 }
8717}
8718
8719function genInlineTemplate (el) {
8720 var ast = el.children[0];

Callers 1

genDataFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected