New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

array-binarysearch

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

array-binarysearch - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

10

index.js
const compare = require('number-compare');
function binarySearch(arr, val, fn=compare, ths=null, bgn=0, end=arr.length) {
function binarySearch(arr, val, bgn=0, end=arr.length) {
while(bgn<end) {
var m = (bgn+end)>>>1;
if(arr[m]<val) bgn = m+1;
else if(arr[m]>val) end = m;
else return m;
}
return -1;
};

2

package.json
{
"name": "array-binarysearch",
"version": "0.0.3",
"version": "0.0.4",
"description": "Get index of value in sorted array.",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc