numbits
JavaScript's native bit math operations, exposed as functions with names.
Why names?
- Easier for readers of your code to distinguish bit math from accidential typo.
- Easier for your linter to guess whether it's a typo.
Is it slower?
- Dunno, probably depends on your optimizer.
Usage
from usage.js:
var bit = eq = deepStrictEqual a = 23 b = 42; { ; } ;;;; ;; b = 1;; // alias: .shup (shift up);; // alias: .shdn (shift down) b = 3;;;;
License
ISC