Comment

Comment by newsbinator

isNumber would make for a legit package. Is there a good way in javascript to determine confidently if an arbitrary input is a number?

e.g: [1, "one", true, false, 0, "zero", null, undefined]

edit: also ["1", "0", etc]

edit 2: also [NaN]

parent newsbinator 5 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton