Hacker News new | ask | show | jobs
by mr__y 2148 days ago
there is also is-odd-even which uses both as dependencies, so it appears they're not

https://www.npmjs.com/package/is-odd-or-even

1 comments

The commit history is surprisingly long. The actual test evolved from

  return !!(~~i >> 0 & 1)
to

  return !!(~~i & 1);
to

  const n = Math.abs(value);
  return (n % 2) === 1;