
Security News
Free Certified Patch for Critical Rails Active Storage Vulnerability
Socket has released a free Certified Patch for a critical Rails Active Storage vulnerability, giving developers time to upgrade to a secure Rails version.
binary-search-range
Advanced tools
Built on binary-search. Returns all indexes of items that match the comparator.
const haystack = [ 1, 3, 5, 6, 6, 6, 9, 11, 14 ]
const needle = 6
const comparator = (a, b) => a - b
binarySearchRange(haystack, needle, comparator) // => [ 3, 4, 5 ]
binarySearchRange(haystack, needle, comparator, lowIndex, highIndex)comparator should be a function that returns 0 for matches, just like your sort function.
FAQs
Use binary search to find a range of matching elements
We found that binary-search-range 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.

Security News
Socket has released a free Certified Patch for a critical Rails Active Storage vulnerability, giving developers time to upgrade to a secure Rails version.

Security News
/Threat Research
A malicious Ruby gem runs a credential-stealing worm during installation, poisons AI coding tools, and can wipe files when a stolen GitHub token is revoked.

Security News
GitHub is tightening GitHub Actions security with new restrictions on privileged pull request workflows. Here's what changes and how maintainers are affected.