2.0.0 • Published 1 year ago

@woftis/linked-list v2.0.0

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

Linked List

Methods

MethodsDescription
sizeReturn the current list size
headReturn the current head object
tailReturn the tail (last) object
toStringReturn list of objects as a string in format ( value ) -> ( value ) -> ( value ) -> null
at(index)Return the object at a given index of the list
appendNode(value)Add a new item at the end of the list. Accepts the value of the node you want to add
prependNode(value)Add a new item at the start of the list (replacing the head). Accepts the value of the node you want to add
popRemove the last item from the list
contains(value)Returns true if the list contains the passed value, else returns false
find(value)Returns the index number of the value if the list contains the passed value, else returns null
insertAt(index, value)Adds value to the specified index position of the list. If 0 is provided, it will prepend to the head, if index is greater than list size it will append to the tail
removeAt(index)Removes value from the specified index position of the list. If 0 is provided, it will remove the head, if index is greater than list size it will return null
2.0.0

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago

0.0.7

1 year ago

0.0.6

1 year ago

0.0.5

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago