Fixed capacity double-ended queue implemented as ring deque.
Creates a new Deque instance of a fixed size.
Deque
Optional
The fixed size of the deque. Defaults to 1024.
1024
Returns the total number of elements in the deque.
Alias of append
Returns the new size of the deque.
Item to append.
Appends a new element to the end of the deque.
Appends a new element to the beginning of the deque.
Item to prepend.
Method used to clear the structure.
Check if a given element is in the deque.
true if the value is found
true
The value to find
Check if there are no items.
true if is empty.
Creates an iterator of [index, value] pairs for all elements in the deque.
[index, value]
Returns the first element that matches the iteratee function.
iteratee
The element if exists
A function that will be invoked per element
Returns the element at the beginning of the deque.
Calls iteratee function for every element in the deque.
Returns the element at a specified index position in the deque.
The given index
Alias of values. Returns iterator of values.
Removes and returns the element at the end of the deque.
Returns the popped item.
Removes and returns the element at the beginning of the deque.
Returns the removed deque element.
Alias of pop
Returns a new array with all the elements in reverse order.
The elements reversed
Update the element at a given index.
index
Returns a new array with all the elements in the order they were added to the deque.
The elements array
Returns an iterator over the deque's values.
Generated using TypeDoc
Fixed capacity double-ended queue implemented as ring deque.