(number)
| 2936 | return parseInt(convertedNumber); |
| 2937 | } |
| 2938 | parseToNumeric(number) { |
| 2939 | const stringVersion = this.numberToString(number); // this will convert 1.0 and 1 to "1" and 1.1 to "1.1" |
| 2940 | // keep this in mind: |
| 2941 | // in JS: 1 === 1.0 is true |
| 2942 | // in Python: 1 == 1.0 is true |
| 2943 | // in PHP: 1 == 1.0 is true, but 1 === 1.0 is false. |
| 2944 | if (stringVersion.indexOf('.') >= 0) { |
| 2945 | return parseFloat(stringVersion); |
| 2946 | } |
| 2947 | return parseInt(stringVersion); |
| 2948 | } |
| 2949 | isRoundNumber(value) { |
| 2950 | // this method is similar to isInteger, but this is more loyal and does not check for types. |
| 2951 | // i.e. isRoundNumber(1.000) returns true, while isInteger(1.000) returns false |
no test coverage detected