Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/aminnairi/javascript-linked-list


https://github.com/aminnairi/javascript-linked-list

Last synced: about 5 hours ago
JSON representation

Awesome Lists containing this project

README

        

# @aminnairi/linked-list

[![Test](https://github.com/aminnairi/javascript-linked-list/actions/workflows/test.yaml/badge.svg)](https://github.com/aminnairi/javascript-linked-list/actions/workflows/test.yaml)

## Requirements

- Node

## Installation

```console
$ npm install @aminnairi/linked-list
```

## Usage

```javascript
"use strict";

const {linkedList} = require("@aminnairi/linked-list");

const myLinkedList = linkedList(2).addFirst(1).addFirst(0).removeFirst();

console.log(Array.from(myLinkedList));
// [1, 2]

console.log(JSON.stringify(myLinkedList));
// "[1,2]"
```