MCPcopy Index your code
hub / github.com/keepfool/vue-tutorials / compileSetter

Function compileSetter

06.Router/basic/js/vue.js:2948–2957  ·  view source on GitHub ↗

* Compile a setter function for the expression. * * @param {String} exp * @return {Function|undefined}

(exp)

Source from the content-addressed store, hash-verified

2946 */
2947
2948 function compileSetter(exp) {
2949 var path = parsePath(exp);
2950 if (path) {
2951 return function (scope, val) {
2952 setPath(scope, path, val);
2953 };
2954 } else {
2955 'development' !== 'production' && warn('Invalid setter expression: ' + exp);
2956 }
2957 }
2958
2959 /**
2960 * Parse an expression into re-written getter/setters.

Callers 1

parseExpressionFunction · 0.70

Calls 3

parsePathFunction · 0.70
setPathFunction · 0.70
warnFunction · 0.70

Tested by

no test coverage detected