Comparing version 1.0.4 to 1.0.5
@@ -35,2 +35,12 @@ | ||
Dequeue.prototype.last = function(){ | ||
if (this.head.prev === this.head) return | ||
return this.head.prev.data | ||
} | ||
Dequeue.prototype.first = function(){ | ||
if (this.head.next === this.head) return | ||
return this.head.next.data | ||
} | ||
Dequeue.prototype.empty = function(){ | ||
@@ -37,0 +47,0 @@ if (this.length === 0 ) return |
{ | ||
"name" : "dequeue" | ||
, "main" : "./lib/index.js" | ||
, "version" : "1.0.4" | ||
, "version" : "1.0.5" | ||
, "description" : "A simple double ended queue datastructure" | ||
@@ -6,0 +6,0 @@ , "keywords" : ["datastructure", "queue", "double ended queue", "fifo", "FIFO", "linked list"] |
@@ -55,2 +55,8 @@ A Simple Double Ended Queue Datastructure | ||
### `value = deque.last()` | ||
Examine the value of the end without removing it. | ||
### `value = deque.first()` | ||
Examine the value of the beginning without removing it. | ||
### `deque.empty()` | ||
@@ -57,0 +63,0 @@ Remove all entries. This is NOT a test for an empty dequeue; use `deque.length` |
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
6029
70
74