
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
in-memory key/value store based on binary search, that support buffers as keys
In-memory key/value store based on a binary search, that supports buffers as keys.
var BinaryMap = require('binary-map')
var bm = BinaryMap()
bm.set(key, value)
value = bm.get(key)
create a new binary-map instance with the given comparator.
By default typewiselite is used,
which should be sufficent for most purposes.
set a key to a value
Like set, except add a pair of values. The object passed in will be used in the external datastructure, so do not mutate it after calling this.
return the value for key, or undefined
return true if key is stored.
return the index key is stored at in the internal array.
If return value is negative, key is not in the array.
Since binary-map wraps binary-search
~i will be the value of the closest key
(the item currently where this key would be if it was in the map)
The internal array. Realize that if you mutate this you might break stuff if you do not preserve the order of the keys.
Return a copy of the internal array. This does not clone the keys or values, so if you mutate something it could break.
MIT
FAQs
in-memory key/value store based on binary search, that support buffers as keys
We found that binary-map 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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.