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

splaytree

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

splaytree - npm Package Compare versions

Comparing version 0.1.3 to 0.1.4

6

dist/splay.es6.js
/**
* splaytree v0.1.3
* splaytree v0.1.4
* Fast Splay tree for Node and browser

@@ -572,5 +572,3 @@ *

static createTree(keys, values, comparator, presort, noDuplicates) {
const tree = new SplayTree(comparator, noDuplicates);
tree.load(keys, values, presort);
return tree;
return new SplayTree(comparator, noDuplicates).load(keys, values, presort);
}

@@ -577,0 +575,0 @@ }

/**
* splaytree v0.1.3
* splaytree v0.1.4
* Fast Splay tree for Node and browser

@@ -595,5 +595,3 @@ *

SplayTree.createTree = function createTree (keys, values, comparator, presort, noDuplicates) {
var tree = new SplayTree(comparator, noDuplicates);
tree.load(keys, values, presort);
return tree;
return new SplayTree(comparator, noDuplicates).load(keys, values, presort);
};

@@ -600,0 +598,0 @@

@@ -563,5 +563,3 @@ function DEFAULT_COMPARE (a, b) { return a > b ? 1 : a < b ? -1 : 0; }

static createTree(keys, values, comparator, presort, noDuplicates) {
const tree = new SplayTree(comparator, noDuplicates);
tree.load(keys, values, presort);
return tree;
return new SplayTree(comparator, noDuplicates).load(keys, values, presort);
}

@@ -568,0 +566,0 @@ }

{
"name": "splaytree",
"version": "0.1.3",
"version": "0.1.4",
"author": "Alexander Milevski <info@w8r.name>",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -41,3 +41,3 @@ # Splay tree [![npm version](https://badge.fury.io/js/splaytree.svg)](https://badge.fury.io/js/splaytree) [![CircleCI](https://circleci.com/gh/w8r/splay-tree.svg?style=svg)](https://circleci.com/gh/w8r/splay-tree)

* `new SplayTree([comparator], [noDuplicates:Boolean])`, where `compare` is optional comparison function
* `new SplayTree([comparator], [noDuplicates:Boolean])`, where `comparator` is optional comparison function
* `tree.insert(key:any, [data:any]):Node` - Insert item

@@ -60,3 +60,4 @@ * `tree.remove(key:any):Boolean` - Remove item

* `tree.next(node):Node` - Successor node
* `tree.load(keys:Array<*>, [values:Array<*>][,presort=false]):Tree` - Bulk-load items. If `presort` is `true`, it will sort keys and values using the comparator(in-place!). You can only use it on an empty tree.
* `tree.load(keys:Array<*>, [values:Array<*>][,presort=false]):Tree` - Bulk-load items. It expects values and keys to be sorted, but if `presort` is `true`, it will sort keys and values using the comparator(in-place!). You can only use it on an empty tree.
* `SplayTree.createTree(keys:Array<Key>, [values:Array<Value>][,comparator][,presort:Boolean][,noDuplicates:Boolean]):SplayTree` - creates and loads the tree. Equivalent of `new SplayTree(comparator, noDuplicates).load(keys, values, presort)`.

@@ -63,0 +64,0 @@ **Comparator**

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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