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

Function checkNode

static/vuejs/vue.esm.js:8875–8899  ·  view source on GitHub ↗
(node, errors)

Source from the content-addressed store, hash-verified

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