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

Function toNumber

06.Router/basic/js/vue.js:128–135  ·  view source on GitHub ↗

* Check and convert possible numeric strings to numbers * before setting back to data * * @param {*} value * @return {*|Number}

(value)

Source from the content-addressed store, hash-verified

126 */
127
128 function toNumber(value) {
129 if (typeof value !== 'string') {
130 return value;
131 } else {
132 var parsed = Number(value);
133 return isNaN(parsed) ? value : parsed;
134 }
135 }
136
137 /**
138 * Convert string boolean literals into real booleans.

Callers 4

processFilterArgFunction · 0.70
vue.jsFile · 0.70
makePropsLinkFnFunction · 0.70
limitByFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected