提交学习笔记专用
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.

9 lines
254 B

  1. import { getType } from './getType.js';
  2. /**
  3. * Returns whether the payload is a number (but not NaN)
  4. *
  5. * This will return `false` for `NaN`!!
  6. */
  7. export function isNumber(payload) {
  8. return getType(payload) === 'Number' && !Number.isNaN(payload);
  9. }