4 ms·
Its dependency, is-odd, has 431,198 weekly downloads.
by Turing_Machine 5y ago
Its dependency, is-odd, has 431,198 weekly downloads.
- kps 5y ago`is-odd` seems overly complicated. Someone should put up a PR to simplify it to var isEven = require('is-even'); module.exports = function isOdd(i) { return !isEven(i); };
- Rickthedick 5y agoLOL and is-even(x) => x % 2 === 0 with a couple type checks... smh just check yourself?
- tyingq 5y agoNot a node person...is this, like, satire? >>is-even/package.json "dependencies": { "is-odd": "^0.1.2" },
- marlowe221 5y agoAlso, both packages are made by the same two guys
- Turing_Machine 5y agoSadly, no.
- dagw 5y agoYes, clearly satire. The whole repo is a send up of the worst tendencies of JavaScript development
- deleted 5y ago[deleted]
- Fiahil 5y agois-odd dependency, is-number, has 52,783,048 weekly downloads. (https://www.npmjs.com/package/is-number https://www.npmjs.com/package/is-number)
- jazzyjackson 5y agojust bizarre considering javascript has isNaN, Number.isFinite, and Number.isInteger; I guess there's a style of development where you check if what you want to do exists in npm first, without thinking about what the language itself offers.
- toshgoodson 5y agoit's not too bizarre when you consider no version of IE supports Number.isFinite or Number.isInteger.
- jazzyjackson 5y agobut this is an npm package, would a client side application be importing this code? surely at that point you could just include some Number polyfill as well (but you're right I was only thinking of node)
- EtienneK 5y agoYes, client side applications use npm as well.
- throw_m239339 5y ago> it's not too bizarre when you consider no version of IE supports Number.isFinite or Number.isInteger. If you are extensively using nodejs libraries to target IE, then you have other problems than supporting Number.isFinite or Number.isInteger to deal with first, considering that IE doesn't support modern ES versions in anyway. You'd have to use shims,polyfills and whatnot at first place and transpile all that npm code into something IE can run. This isn't a very good argument to add an "is-even" package.