MCPcopy
hub / github.com/fanmingming/live / parseFor

Function parseFor

m3u8/vue.js:10013–10030  ·  view source on GitHub ↗
(exp)

Source from the content-addressed store, hash-verified

10011
10012
10013 function parseFor (exp) {
10014 var inMatch = exp.match(forAliasRE);
10015 if (!inMatch) { return }
10016 var res = {};
10017 res.for = inMatch[2].trim();
10018 var alias = inMatch[1].trim().replace(stripParensRE, '');
10019 var iteratorMatch = alias.match(forIteratorRE);
10020 if (iteratorMatch) {
10021 res.alias = alias.replace(forIteratorRE, '').trim();
10022 res.iterator1 = iteratorMatch[1].trim();
10023 if (iteratorMatch[2]) {
10024 res.iterator2 = iteratorMatch[2].trim();
10025 }
10026 } else {
10027 res.alias = alias;
10028 }
10029 return res
10030 }
10031
10032 function processIf (el) {
10033 var exp = getAndRemoveAttr(el, 'v-if');

Callers 1

processForFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected