mirror of
https://github.com/biobulkbende/biobulkbende.org.git
synced 2024-11-16 12:43:05 +00:00
12 lines
501 B
JavaScript
12 lines
501 B
JavaScript
|
"use strict";
|
||
|
var isArray_1 = require('../util/isArray');
|
||
|
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_1.isArray(val) && (val - parseFloat(val) + 1) >= 0;
|
||
|
}
|
||
|
exports.isNumeric = isNumeric;
|
||
|
;
|
||
|
//# sourceMappingURL=isNumeric.js.map
|