Re:4B If Statements
by chrisandchris on Thursday December 28, 2023 @03:07AM
(#38791149)
The funniest (or best part) about those two packages is that is-even has a dependency to is-odd and does just negate the output of is-odd.
[ Parent
| on HN ]
It’s true, the great thing about clean, reusable, modular code like this is that you can compose both of these packages to make a is-even-or-odd package.
Well first you need to obviously build an OR package, part of your suite of logical operator packages, all depending on your battle-tested, high performance XOR package.
Groundbreaking!
You joke... but https://www.npmjs.com/package/is-odd-or-even