isNumbery.cjs 467 B

123456789101112131415
  1. // NOTICE: This file is generated by Rollup. To modify it,
  2. // please instead edit the ESM counterpart and rebuild with Rollup (npm run build).
  3. 'use strict';
  4. /**
  5. * Check whether it's a number or a number-like string:
  6. * i.e. when coerced to a number it == itself.
  7. *
  8. * @param {string | number} value
  9. */
  10. function isNumbery(value) {
  11. return value.toString().trim().length !== 0 && Number(value) == value; // eslint-disable-line eqeqeq
  12. }
  13. module.exports = isNumbery;