sorted-array
Advanced tools
Comparing version 1.0.0 to 1.1.0
@@ -5,3 +5,3 @@ { | ||
"description": "An implementation of John von Neumann's sorted arrays in JavaScript. Implements insertion sort and binary search for fast insertion and deletion.", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"keywords": ["sorted", "array", "Neumann", "insertion", "sort", "insert", "binary", "search", "deletion", "delete"], | ||
@@ -8,0 +8,0 @@ "main": "lib/sorted-array.js", |
@@ -38,3 +38,3 @@ if (typeof module === "object") module.exports = SortedArray; | ||
SortedArray.prototype.delete = function (element) { | ||
SortedArray.prototype.remove = function (element) { | ||
var index = this.search(element); | ||
@@ -41,0 +41,0 @@ if (index >= 0) this.array.splice(index, 1); |
{ | ||
"name": "sorted-array", | ||
"description": "An implementation of John von Neumann's sorted arrays in JavaScript. Implements insertion sort and binary search for fast insertion and deletion.", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"keywords": ["sorted", "array", "Neumann", "insertion", "sort", "insert", "binary", "search", "deletion", "delete"], | ||
@@ -6,0 +6,0 @@ "author": "Aadit M Shah (http://aaditmshah.github.com/) <aaditmshah@myopera.com>", |
@@ -22,4 +22,4 @@ # Sorted Array # | ||
sorted.search(3); // 2 | ||
sorted.delete(3); // [1, 2, 4, 5] | ||
sorted.remove(3); // [1, 2, 4, 5] | ||
sorted.insert(3); // [1, 2, 3, 4, 5] | ||
``` |