ml-hash-table
Advanced tools
Comparing version 0.2.0 to 0.2.1
{ | ||
"name": "ml-hash-table", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"description": "Open addressing hash table", | ||
@@ -32,9 +32,10 @@ "main": "src/HashTable.js", | ||
"devDependencies": { | ||
"mocha": "^2.4.5", | ||
"should": "^8.3.1" | ||
"mocha": "^3.1.0", | ||
"should": "^11.1.0" | ||
}, | ||
"dependencies": { | ||
"ml-binary-search": "^1.0.1", | ||
"new-array": "^1.0.0" | ||
"binary-search": "^1.3.2", | ||
"new-array": "^1.0.0", | ||
"num-sort": "^1.0.0" | ||
} | ||
} |
@@ -1,2 +0,3 @@ | ||
const binarySearch = require('ml-binary-search'); | ||
const binarySearch = require('binary-search'); | ||
const sortAsc = require('num-sort').asc; | ||
@@ -74,8 +75,8 @@ const largestPrime = 0x7fffffff; | ||
primeNumbers.sort((a, b) => a - b); | ||
primeNumbers.sort(sortAsc); | ||
function nextPrime(value) { | ||
let index = binarySearch(primeNumbers, value); | ||
let index = binarySearch(primeNumbers, value, sortAsc); | ||
if (index < 0) { | ||
index = -index - 1; | ||
index = ~index; | ||
} | ||
@@ -82,0 +83,0 @@ return primeNumbers[index]; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
15495
6
310
1
7
3
+ Addedbinary-search@^1.3.2
+ Addednum-sort@^1.0.0
+ Addedbinary-search@1.3.6(transitive)
+ Addednum-sort@1.0.0(transitive)
+ Addednumber-is-nan@1.0.1(transitive)
- Removedml-binary-search@^1.0.1
- Removedml-binary-search@1.1.2(transitive)