
Product
Introducing Custom Tabs for Org Alerts
Create and share saved alert views with custom tabs on the org alerts page, making it easier for teams to return to consistent, named filter sets.
bit-and-tree
Advanced tools
A tree on top of a bitfield that represent a BITWISE-AND structure.
npm install bit-and-tree
Uses flat-tree indexing to represent the tree on top of a bitfield. If you are not familiar with this you should read that module's README first to understand what each index means.
var bat = require('bit-and-tree')
var tree = bat()
// returns false since at least one child is false
console.log(tree.get(1))
// set two bottom nodes to true
tree.set(0, true)
tree.set(2, true)
// returns true since both children are now true
console.log(tree.get(1))
var tree = bat([buffer])Create a new bit tree. Optionally pass in a buffer representing your tree.
var updated = tree.set(index, bool)Set a bit. If you set a bit to true and the sibling bit is also true the parent bit will set as well.
Similarly if you set a bit to false all parent bits will be set to false.
Returns true if the bitfield was updated and false otherwise.
var bool = tree.get(index)Get the status of a bit.
MIT
FAQs
A tree on top of a bitfield that represent a BITWISE-AND structure
We found that bit-and-tree demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Create and share saved alert views with custom tabs on the org alerts page, making it easier for teams to return to consistent, named filter sets.

Product
Socket’s Rust and Cargo support is now generally available, providing dependency analysis and supply chain visibility for Rust projects.

Security News
Chrome 144 introduces the Temporal API, a modern approach to date and time handling designed to fix long-standing issues with JavaScript’s Date object.