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

Function parseModel

static/vuejs/vue.js:5609–5635  ·  view source on GitHub ↗
(val)

Source from the content-addressed store, hash-verified

5607var expressionEndPos;
5608
5609function parseModel (val) {
5610 str = val;
5611 len = str.length;
5612 index$1 = expressionPos = expressionEndPos = 0;
5613
5614 if (val.indexOf('[') < 0 || val.lastIndexOf(']') < len - 1) {
5615 return {
5616 exp: val,
5617 idx: null
5618 }
5619 }
5620
5621 while (!eof()) {
5622 chr = next();
5623 /* istanbul ignore if */
5624 if (isStringStart(chr)) {
5625 parseString(chr);
5626 } else if (chr === 0x5B) {
5627 parseBracket(chr);
5628 }
5629 }
5630
5631 return {
5632 exp: val.substring(0, expressionPos),
5633 idx: val.substring(expressionPos + 1, expressionEndPos)
5634 }
5635}
5636
5637function next () {
5638 return str.charCodeAt(++index$1)

Callers 1

genAssignmentCodeFunction · 0.70

Calls 5

eofFunction · 0.70
nextFunction · 0.70
isStringStartFunction · 0.70
parseStringFunction · 0.70
parseBracketFunction · 0.70

Tested by

no test coverage detected