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

Function checkNode

static/vuejs/vue.js:8871–8895  ·  view source on GitHub ↗
(node, errors)

Source from the content-addressed store, hash-verified

8869}
8870
8871function checkNode (node, errors) {
8872 if (node.type === 1) {
8873 for (var name in node.attrsMap) {
8874 if (dirRE.test(name)) {
8875 var value = node.attrsMap[name];
8876 if (value) {
8877 if (name === 'v-for') {
8878 checkFor(node, ("v-for=\"" + value + "\""), errors);
8879 } else if (onRE.test(name)) {
8880 checkEvent(value, (name + "=\"" + value + "\""), errors);
8881 } else {
8882 checkExpression(value, (name + "=\"" + value + "\""), errors);
8883 }
8884 }
8885 }
8886 }
8887 if (node.children) {
8888 for (var i = 0; i < node.children.length; i++) {
8889 checkNode(node.children[i], errors);
8890 }
8891 }
8892 } else if (node.type === 2) {
8893 checkExpression(node.expression, node.text, errors);
8894 }
8895}
8896
8897function checkEvent (exp, text, errors) {
8898 var keywordMatch = exp.replace(stripStringRE, '').match(unaryOperatorsRE);

Callers 1

detectErrorsFunction · 0.70

Calls 3

checkForFunction · 0.70
checkEventFunction · 0.70
checkExpressionFunction · 0.70

Tested by

no test coverage detected