4 ms·
I’ve given up waiting for nodejs to become a reliable environment. Just recently the `is-even` package came to light and highlighted that things aren’t getting
by stephenr 9y ago
I’ve given up waiting for nodejs to become a reliable environment. Just recently the `is-even` package came to light and highlighted that things aren’t getting any better than when leftpad was a thing.
I can’t wait to see tc39’s response to the `is-even` shit show after they decided to just add leftpad to the stdlib.
- da_chicken 9y agoWow, I hadn't heard about the is-odd/is-even/is-number thing. That's hilarious and awful. Reminds me of: https://github.com/jezen/is-thirteen https://github.com/jezen/is-thirteen
- stephenr 9y agoThe “best” part of it all is that apparently js engines have an internal optimisation for `foo % 2 === 0`, because it’s such a common thing. This clown was using a bit wise operation in `is-even` “because everyone already knows about % 2 === 0`, and thus was hurting performance (on top of whatever extra memory is used for the module, function call overhead etc)