number.js 225 B

1234567891011
  1. export function isNumeric(val) {
  2. return /^\d+(\.\d+)?$/.test(val);
  3. }
  4. export function isNaN(val) {
  5. if (Number.isNaN) {
  6. return Number.isNaN(val);
  7. } // eslint-disable-next-line no-self-compare
  8. return val !== val;
  9. }