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

Function genDirectives

static/vuejs/vue.js:8690–8713  ·  view source on GitHub ↗
(el)

Source from the content-addressed store, hash-verified

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

Callers 1

genDataFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected