1.0.8 • Published 5 years ago

@jeremiah_tenbrink/doubly-linked-list v1.0.8

Weekly downloads
1
License
-
Repository
github
Last release
5 years ago

A Doubly Linked list for javascript.

Documentation

Read documentation here.

Install

With Npm

npm install @jeremiah_tenbrink/doubly-linked-list

With Yarn

yarn add @jeremiah_tenbrink/doubly-linked-list

Usage

Add to head

import {DoublyLinkedList} from '@jeremiah_tenbrink/doubly-linked-list';
const dll = DoublyLinkedList();

dll.addToHead("some value");

let dllSize = dll.getSize();
let value = dll.removeFromHead();
console.log(value);

dll.addToTail(45);
dll.addToTail(50);
value = dll.removeFromTail();
console.log(value);

dll.forEach(item => {
  console.log(item);
}).then(result => {
  console.log(result.complete);
}).catch(e => {
  console.log(e.message)
})

dll.forSome(item => {
  console.log(item);
  return true;
}).then(result => {
  console.log(result.complete) // should be false because true was returned in the forSome callback function
}).catch(e => {
  console.log(e.message)
})

Author

šŸ‘¤ Jeremiah Tenbrink

šŸ¤ Contributing

Contributions, issues and feature requests are welcome!Feel free to check issues page

Show your support

Give a ā­ļø if this project helped you!


This README was generated with ā¤ļø by readme-md-generator

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.2

5 years ago

1.0.3

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago