Module for linked list integrated with javascript.
-
append(value): appendsvalueto the list, giving it the newest index. -
prepend(value): prependsvalueto the list, giving it index 0. -
size(): returns the size of the list. -
head(): returns the head(first) node of the list. -
tail(): returns the tail(last) node of the list. -
at(index): returns the index of the first node with a value ofvalue. -
pop(): removes the head node from the list and returns its value, shifting all other nodes. -
contains(value): returnstrueifvalueif found in the list. otherwise, returnsfalse. -
findIndex(value): return the index ofvaluein the list. if it cannot findvalueit instead returns-1. -
toString(): returns all values in the list as a string formatted as:(value) -> (value2) -> (value3) -> null -
insertAt(index, ...values): insertsvaluesin order atindex, shifting all other nodes fromindexonward. -
removeAt(index): removesindexfrom list and shifts all values after.