Hacker News new | ask | show | jobs
by daxterspeed 2554 days ago
is-odd's behavior is also extremely odd. It depends on "is-number" (why would this need a dependency to begin with?), which checks in the most bizarre way imaginable if the input number or string(??) is finite. is-number, and by extension is-odd, also doesn't support BigInts.

These projects seem to have been created and promoted just to boost the author's "npm score" / package count. These micro-modules must cause more problems than they solve.

1 comments

To be fair, it is actually far from trivial to determine whether a value is a numeric value in JavaScript, and most all-in-one utility libraries (jQuery, Lodash, etc.) java something of similar functionality. If there is one function that needs its own NPM entry, this probably is.