number.js 309 B

123456789101112131415161718
  1. "use strict";
  2. exports.__esModule = true;
  3. exports.isNumeric = isNumeric;
  4. exports.isNaN = isNaN;
  5. function isNumeric(val) {
  6. return /^\d+(\.\d+)?$/.test(val);
  7. }
  8. function isNaN(val) {
  9. if (Number.isNaN) {
  10. return Number.isNaN(val);
  11. } // eslint-disable-next-line no-self-compare
  12. return val !== val;
  13. }