Package Exports
- @dibzthedibz/linked-list-library
- @dibzthedibz/linked-list-library/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@dibzthedibz/linked-list-library) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@dibzthedibz/linked-list-library
@dibzthedibz/linked-list-library is a simple and efficient JavaScript library for working with linked lists. This library provides an easy-to-use API for common linked list operations such as inserting nodes, finding nodes, converting between arrays and linked lists, making circular lists, and checking if a list is circular.
Installation
To install this library, use npm:
npm install @dibzthedibz/linked-list-library
const LinkedList = require('@dibzthedibz/linked-list-library');
const list = new LinkedList();
list.insertAtHead(10);
list.insertAtTail(20);
list.insertInMiddle(15, 1);
const node = list.findNodeAt(1);
console.log(node);
list.arrayToList([1, 2, 3, 4, 5]);
const arr = list.listToArray();
console.log(arr);
list.makeCircular(2);
const isCircular = list.isCircular();
console.log(isCircular);
I hope this format works for you! This is my first library, and is more practice than something i expect people to need, but if it helps you, I'm glad! Let me know if you need any more adjustments.