@ffflorian/doublelinkedlist
TypeScript icon, indicating that this package has built-in type declarations

3.5.3 • Public • Published

double-linked-list License: GPL v3 npm version

A linked list in which every element knows about its predecessor and its successor.

 ______     ______     ______
| |  | |   | |  | |   | |  | |
| |  | <---> |  | <---> |  | |
|_|__|_|   |_|__|_|   |_|__|_|
  prev        n         next

Prerequisites

Installation

ℹ️ This is a hybrid CommonJS / ESM module.

Run yarn add @ffflorian/doublelinkedlist or npm i @ffflorian/doublelinkedlist.

Usage

import {LinkedList} from '@ffflorian/doublelinkedlist';

const list = new LinkedList();
list.add('one');
list.add('two');
list.add('three');
list.get(0); // 'one'

The full API documentation is available at https://ffflorian.github.io/DoubleLinkedList.

Testing

First, install the needed packages for testing:

yarn

Now run the tests:

yarn test

Dependencies (0)

    Dev Dependencies (5)

    Package Sidebar

    Install

    npm i @ffflorian/doublelinkedlist

    Weekly Downloads

    258

    Version

    3.5.3

    License

    GPL-3.0

    Unpacked Size

    89.4 kB

    Total Files

    21

    Last publish

    Collaborators

    • ffflorian