(x)
| 433 | } |
| 434 | |
| 435 | export function isNumber(x) { |
| 436 | // XXX this does not handle 0xabc123 etc. We should likely also do x == parseInt(x) (which handles that), and remove hack |// handle 0x... as well| |
| 437 | return x == parseFloat(x) || (typeof x == 'string' && x.match(/^-?\d+$/)) || x == 'NaN'; |
| 438 | } |
| 439 | |
| 440 | // ensures that a float type has either 5.5 (clearly a float) or +5 (float due to asm coercion) |
| 441 | function asmEnsureFloat(value, type) { |
no test coverage detected