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

Function checkNode

static/vuejs/vue.common.js:8877–8901  ·  view source on GitHub ↗
(node, errors)

Source from the content-addressed store, hash-verified

8875}
8876
8877function checkNode (node, errors) {
8878 if (node.type === 1) {
8879 for (var name in node.attrsMap) {
8880 if (dirRE.test(name)) {
8881 var value = node.attrsMap[name];
8882 if (value) {
8883 if (name === 'v-for') {
8884 checkFor(node, ("v-for=\"" + value + "\""), errors);
8885 } else if (onRE.test(name)) {
8886 checkEvent(value, (name + "=\"" + value + "\""), errors);
8887 } else {
8888 checkExpression(value, (name + "=\"" + value + "\""), errors);
8889 }
8890 }
8891 }
8892 }
8893 if (node.children) {
8894 for (var i = 0; i < node.children.length; i++) {
8895 checkNode(node.children[i], errors);
8896 }
8897 }
8898 } else if (node.type === 2) {
8899 checkExpression(node.expression, node.text, errors);
8900 }
8901}
8902
8903function checkEvent (exp, text, errors) {
8904 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