All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- jsdocs
- LinkedList
removeEach
edge case to disconnect removed nodes from the remaining nodes in the list. - LinkedList & DoublyLinkedList ts types, remove the necessity to cast to the custom node type in functions.
toArray
fix ts return type.
insertBefore
to add a node before an existing node in the DoublyLinkedList.insertAfter
to add a node after an existing node in the DoublyLinkedList.
- Allow inserting node types into the linked list.
- a bug in
removeEach
.
- typo in LinkedListNode.
- add types to package.json
- readme.
- TS types and readme.
.find
now accepts a second param as the starting node in both types..findReverse
added to DoublyLinkedList..fromArray
static method added to both types.
- index.d.ts
- typescript.
- README
- insert/remove methods now all returns the inserted/removed nodes.
insertLast
in LinkedList now accepts a starting node as a second param, useful to insert a node at the end in O(1) runtime.removeEach
now returns the number of removed nodes.
remove(node)
to DoublyLinkedList to remove any node in O(1) runtime.hasNext
/hasPrev
cleaner checks of connected nodes to Node classes.
- bug in removeEach method.
- improved README, splitted LinkedList/DoublyLinkedList readmes.
.removeFirst()
,.removeLast()
,.removeAt
,.removeEach
now return the removed nodes.
.removeFirst()
when removing first from a single-node linked list.
- readme
- readme
.insertAt(position, value)
position now comes first then value..insert*
methods now returns athis
reference so it can be chained..forEach(cb)
callback now gets called with node and position (starting from 0);.forEachReverse(cb)
callback now gets called with node and position (starting from size -1);LinkedListNode
&DoublyLinkedListNode
classes are now exported in index.
- jsdoc
- readme
.isEmpty()
method for LinkedList & DoublyLinkedList.
- README & jsdocs
- jsdocs
- Readme & package.json
- New release for LinkedList & DoublyLinkedList