Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ml-hash-table

Package Overview
Dependencies
Maintainers
7
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ml-hash-table - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

History.md

11

package.json
{
"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];

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