
Research
/Security News
Contagious Interview Campaign Escalates With 67 Malicious npm Packages and New Malware Loader
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.
tiny-binary-search
Advanced tools
A very small binary search index.
npm install tiny-binary-search
var index = new BinarySearchIndex([
{ value: 0, id: "A" },
{ value: 1, id: "B" },
{ value: 2, id: "C" },
{ value: 3, id: "D" },
{ value: 4, id: "E" },
{ value: 5, id: "F" },
{ value: 6, id: "G" },
{ value: 7, id: "H" },
{ value: 8, id: "I" },
{ value: 9, id: "J" }
]);
index.query(5); // get the item with a value of 5
index.between(1, 3); // get all items with values between 1 and 3 (inclusive)
index.getIndex(0.5); // get the index of an item with a particular value in the array
index.insert({value: 0.5, id: "AA"}); // insert a single item into the index
index.bulkAdd([
{ value: 1.5, id: "BB" },
{ value: 2.5, id: "CC" },
]); // add an array of items to the index
This module is distributed as a UMD module and can also be used in AMD based systems or as a global under the BinarySearchIndex
namespace.
Find a bug or want to request a new feature? Please let us know by submitting an issue.
[1.0.3]
pkg.module
for downstream ES dependents.FAQs
Very small binary search index implimentation.
The npm package tiny-binary-search receives a total of 15,948 weekly downloads. As such, tiny-binary-search popularity was classified as popular.
We found that tiny-binary-search demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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.
Research
/Security News
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.