|
|
|
|
|
by tshaddox
1814 days ago
|
|
It's not really that crazy. This package is a small amount of code, but it's important code (the same goes for this package's dependency is-number). This package shows up in the dependency trees of some popular packages, which is probably where most of the weekly downloads come from. If you're writing straightforward application code where you already know you have a valid number, then this package probably isn't for you. You can just do num % 2 === 1. |
|
function is_number(val) { return typeof val === "number"; }
With a function that easily written, no one should have any excuse to depend on a third-party dependency for it.