Subtheme of barrio
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.
 
 
 
 

1 lines
832 B

{"version":3,"file":"isNumeric.js","sourceRoot":"","sources":["../../src/util/isNumeric.ts"],"names":[],"mappings":";AAAA,wBAAwB,iBAAiB,CAAC,CAAA;AAE1C,mBAA0B,GAAQ;IAChC,oEAAoE;IACpE,mFAAmF;IACnF,uCAAuC;IACvC,+DAA+D;IAC/D,MAAM,CAAC,CAAC,iBAAO,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,GAAG,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC;AAC3D,CAAC;AANe,iBAAS,YAMxB,CAAA;AAAA,CAAC","sourcesContent":["import { isArray } from '../util/isArray';\n\nexport function isNumeric(val: any): val is number {\n // parseFloat NaNs numeric-cast false positives (null|true|false|\"\")\n // ...but misinterprets leading-number strings, particularly hex literals (\"0x...\")\n // subtraction forces infinities to NaN\n // adding 1 corrects loss of precision from parseFloat (#15100)\n return !isArray(val) && (val - parseFloat(val) + 1) >= 0;\n};\n"]}