easylinkedlist
TypeScript icon, indicating that this package has built-in type declarations

1.2.0 • Public • Published

Easy-List: Simple Doubly Linked-List implementation

Because I found out JavaScript didn't have linked lists...

Getting Started

ES6 is required.

Installation

npm install easy-list@latest

Importing

Supports both Typescript and Javascript
Typescript importing

import { easyLinkedList } from 'easylinkedlist' 

const list = new easyLinkedList<Number>();

CommonJS importing

const { easyLinkedList } = require('easylinkedlist');
const list = new easyLinkedList();

Basic Usage

list.push(1).push(2).push(3).push(4); // [ 1, 2, 3, 4 ]
list.pop(); // [ 1, 2, 3 ]
list.shift(); // [ 2, 3 ]
list.unshift(1).unshift(0); // [ 0, 1, 2, 3 ]
list.isEmpty(); // false
list.set(1, 4); // [ 0, 4, 2, 3 ]

Documentation

Package Sidebar

Install

npm i easylinkedlist

Weekly Downloads

1

Version

1.2.0

License

GPL-3.0

Unpacked Size

51.3 kB

Total Files

10

Last publish

Collaborators

  • 3gigs