Skip to content

Commit

Permalink
Update documentation to clarify that multiple values can be added
Browse files Browse the repository at this point in the history
  • Loading branch information
erayd committed Sep 8, 2016
1 parent fc02593 commit 8bd298a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,16 @@ for(myValue of s) {

### .push(), .enqueue()
```javascript
s.push(myValue);
s.enqueue(myValue);
s.push(myValue...);
s.enqueue(myValue...);
```
Append a value to the end of the queue. If a max queue size has been set, and the
queue is full, then this method will throw an error. `enqueue()` and `push()` are
synonymous.

If more than one value is supplied, then they will all be added to the queue
in the order that they are supplied.

### .shift(), .dequeue()
```javascript
var myValue = s.shift();
Expand All @@ -58,11 +61,14 @@ synonymous.

### .unshift()
```javascript
s.unshift(myValue);
s.unshift(myValue...);
```
Prepend a value to the head of the queue. If a max queue size has been set, and
the queue is full, then this method will throw an error.

If more than one value is supplied, then they will all be added to the queue
in the order that they are supplied.

### .pop()
```javascript
var myValue = s.pop();
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "spique",
"version": "1.0.1",
"version": "1.0.2",
"description": "A spiral deque - high performance and dynamic queue size",
"main": "spique.js",
"scripts": {
Expand Down

0 comments on commit 8bd298a

Please sign in to comment.