MCPcopy Index your code
hub / github.com/ygs-code/vue / parseModifiers

Function parseModifiers

vue.js:13976–13986  ·  view source on GitHub ↗
(name)

Source from the content-addressed store, hash-verified

13974
13975 //把字符串中的对象拆分成 对象比如 data.object.info.age 变成对象{object:true,info:true,age:true} 返回出去
13976 function parseModifiers(name) {
13977 // 匹配以点开头的分组 不属于点 data.object.info.age 匹配到 ['.object','.info' , '.age']
13978 var match = name.match(modifierRE);
13979 if (match) {
13980 var ret = {};
13981 match.forEach(function (m) {
13982 ret[m.slice(1)] = true; //去除点,丢弃第一位。 把他变成对象{object:true,info:true,age:true}
13983 });
13984 return ret
13985 }
13986 }
13987
13988 /*
13989 把数组对象转换成 对象 例如

Callers 1

processAttrsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected