Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

doublell

Package Overview
Dependencies
Maintainers
0
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

doublell

A very minimal double linked list

  • 1.1.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
219
increased by13.47%
Maintainers
0
Weekly downloads
 
Created
Source

doublell

Downloads Size

A very minimal Double Linked List implementation for browsers and Node.

Provided as:

  • CommonJS
  • ES Module

Usage Examples

const list = new DoubleLinkedList<number>();
const node1 = list.append(1);
const node0 = list.prepend(0);
const node0_5 = list.insertBeforeNode(node1, 0.5);
const node1_5 = list.insertAfterNode(node1, 1.5);
console.log(list.getLength());
console.log(list.getHead()?.value);
console.log(list.getTail()?.value);
console.log(node0.nextNode?.value);
console.log(node1.previousNode?.value);
list.remove(node0);
list.clear();

API Docs

Thanks

Thanks for checking it out. Feel free to create issues or otherwise provide feedback.

Be sure to check out our other TypeScript OSS projects as well.

Keywords

FAQs

Package last updated on 31 Oct 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc