JAVASCRIPT   74

is number

Guest on 1st May 2022 04:39:19 PM

  1. export default function isNumber(input) {
  2.     return (
  3.         typeof input === 'number' ||
  4.         Object.prototype.toString.call(input) === '[object Number]'
  5.     );
  6. }

Raw Paste


Login or Register to edit or fork this paste. It's free.