# doubly-link-list

> Javascript implementation of Doubly Linked List

Latest version **1.0.0** (published 2019-12-13) · ISC license · 0 weekly downloads

## Install

```sh
npm install doubly-link-list
pnpm add doubly-link-list
yarn add doubly-link-list
bun add doubly-link-list
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2019-12-13 |
| First published | 2019-12-13 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 14.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Syed Muhammad Rizwan |
| Maintainers | syedrizwan |

## Links

- npm: https://www.npmjs.com/package/doubly-link-list
- npm.io page: https://npm.io/package/doubly-link-list

## Recent versions

- 1.0.0 (latest) — 2019-12-13

## README

# Doubly Linked List

Javascript implementation of a doubly linked list data structure

## Install

### `npm install doubly-linked-list`

## Usage

```js
const DoublyLinkedList = require('doubly-linked-list');

// Create a new, empty list.
const list = new DoublyLinkedList();

// Insert value at the beginning of the list.
list.addFirst(1);

// Retrieve the first item of the list (without removing it).
const first = list.getFirst();

// Transform the linked list into an array.
const array = list.toArray();

// Remove the first item from the list.
const first = list.removeFirst();

// Remove the first occurrence the given value from the list.
// Returns true if an element was removed, false otherwise.
const wasRemoved = list.remove(1);

## Running the Tests

In the project directory:

### `npm install`

Install all the dependecies for the project.

### `npm test`

Launches the test runner in the interactive watch mode.<br>
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.


## Authors

* **Syed Muhammad Rizwan** - [syedmrizwan](https://github.com/syedmrizwan)

---
_Source: https://npm.io/package/doubly-link-list · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
