doublell
A very minimal Double Linked List implementation for browsers and Node.
Usage Examples
const list = new DoubleLinkedList<number>();
const node1 = list.append(1);
const node2 = list.prepend(2);
console.log(list.getLength());
console.log(list.getHead()?.value);
console.log(list.getTail()?.value);
console.log(node2.nextNode?.value);
console.log(node1.previousNode?.value);
list.remove(node2);
list.clear();
API Docs
Thanks
Thanks for checking it out. Feel free to create issues or otherwise provide feedback.
Be sure to check out our other TypeScript OSS projects as well.