|
|
|
|
|
by unstable
672 days ago
|
|
Accepting NaN as a number can potentially crash your app, that's why I reject it in isNumber. I only tried to highlight some edge cases that I personally don't like to spend energy on, trying to get it right, when writing code. Btw, isNumber is a dynamic call in the example and unrelated to TypeScript. TypeScript doesn't exist at runtime. |
|