You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
512 B
11 lines
512 B
/** PURE_IMPORTS_START .._util_isArray PURE_IMPORTS_END */ |
|
import { isArray } from '../util/isArray'; |
|
export function isNumeric(val) { |
|
// parseFloat NaNs numeric-cast false positives (null|true|false|"") |
|
// ...but misinterprets leading-number strings, particularly hex literals ("0x...") |
|
// subtraction forces infinities to NaN |
|
// adding 1 corrects loss of precision from parseFloat (#15100) |
|
return !isArray(val) && (val - parseFloat(val) + 1) >= 0; |
|
} |
|
; |
|
//# sourceMappingURL=isNumeric.js.map
|
|
|