* Convert a input value to a number for persistence. * If the conversion fails, return original string.
(val)
| 126 | * If the conversion fails, return original string. |
| 127 | */ |
| 128 | function toNumber(val) { |
| 129 | //字符串转数字,如果失败则返回字符串 |
| 130 | var n = parseFloat(val); |
| 131 | return isNaN(n) ? val : n |
| 132 | } |
| 133 | |
| 134 | /** |
| 135 | * Make a map and return a function for checking if a key |
no outgoing calls
no test coverage detected