You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

binarysearch

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

binarysearch - npm Package Compare versions

Comparing version

to
1.0.0

test/strings.js

12

index.js

@@ -130,2 +130,3 @@

var indexMode,indexModeSearch;
var stringMode;
return function(v,search){

@@ -141,3 +142,12 @@ // support the object format of generated indexes

return v - search;
if(stringMode === undefined){
stringMode = false
if(typeof search === 'string' || typeof v === "string"){
stringMode = true
}
}
if(stringMode) v = v+''
return v > search ? 1 : v < search ? -1 : 0
};

@@ -144,0 +154,0 @@ };

7

package.json
{
"name": "binarysearch",
"description": "pure js binary search for sorted javascript arrays||array like objects. returns any || last || first || closest matched key for value, or slice between 2 values where values need not exist.",
"version": "0.2.4",
"version": "1.0.0",
"repository": {

@@ -12,6 +12,3 @@ "url": "git://github.com/soldair/node-binarysearch.git"

},
"contributors":[
"Ryan Day <soldair@gmail.com>",
"Nicolas LaCasse <nicolas.lacasse@gmail.com> (https://github.com/nlacasse)"
],
"author": "Ryan Day <soldair@gmail.com>",
"dependencies": {},

@@ -18,0 +15,0 @@ "devDependencies": {