* Tries to read a number value out of a string, if it fails to match the * entire string, returns the original string instead
(str)
| 85 | * entire string, returns the original string instead |
| 86 | */ |
| 87 | function tryParseNumber(str) { |
| 88 | var num = parseFloat(str); |
| 89 | if (num == str) { |
| 90 | return num; |
| 91 | } |
| 92 | |
| 93 | return str; |
| 94 | } |
| 95 | |
| 96 | /** |
| 97 | * Tries to read an integer value out of a string, if it fails to match the |
no outgoing calls
no test coverage detected
searching dependent graphs…