* Convert a input value to a number for persistence. * If the conversion fails, return original string.
(val)
| 21 | * If the conversion fails, return original string. |
| 22 | */ |
| 23 | function toNumber (val) { |
| 24 | var n = parseFloat(val); |
| 25 | return isNaN(n) ? val : n |
| 26 | } |
| 27 | |
| 28 | /** |
| 29 | * Make a map and return a function for checking if a key |
no outgoing calls
no test coverage detected