Returns the first node or undefined if the list is empty.
Returns the first value or undefined if the list is empty.
Returns the last node or undefined if the list is empty.
Returns the last value or undefined if the list is empty.
Iterable for iterating this collection in reverse order.
The version number used to track changes.
Protected
_Protected
_Protected
_Adds a item after the specified node.
The node to precede the item.
The value to insert after the node.
Adds a item before the specified node.
The node to follow the item.
The value to insert before the node.
Throws if the provided version does not match the current one.
Iterates the list returns the the first node that matches the value specified. Returns undefined if not found.
The node matching the item or undefined if not found
Iterates the list in reverse returns the the first node that matches the value specified. Returns undefined if not found.
The node matching the item or undefined if not found
Gets the number of nodes in the list.
Iterates the list returns the the node at the index requested. Returns undefined if the index is out of range.
The node at the index requested or undefined.
Iterates the list returns the value of the node at the index requested. Returns undefined if the index is out of range.
The value at the index requested or undefined.
Increments the collection version. Useful for tracking changes.
The new version.
Removes the node at the specified index.
True if the node was removed. False if the index was out of range.
Removes the first node.
True if the node was removed. False if the list is empty.
Removes the last node.
True if the node was removed. False if the list is empty.
Removes the node specified.
True if the node was removed. False if not found (already removed).
Iterates the list and finds the first node that matches the provided value and removes it.
The value to remove.
True if found and removes, otherwise false.
Removes the first node and returns its value.
The value of the first node or undefined if the list is empty.
Removes the last node and returns its value.
The value of the last node or undefined if the list is empty.
A doubly (bidirectional) linked list. Acts as a safe, value focused wrapper for a linked-node-list.