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

@windfish-studio/dbly-linked-hashtable-list

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@windfish-studio/dbly-linked-hashtable-list

Javascript implementation of a doubly linked-list data structure, with built-in hashtable for O(1) lookups and removals

  • 0.3.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Doubly Linked List

Description

This is a fork of Jason Jones' doubly-linked-list library, aimed to provide a doubly-linked-list data structure that also supports O(1) constant-time lookups of elements by ID.

This is accomplished by:

  • Quickly generating a unique ID for each element inserted into the doubly-linked list.
  • Index all entries in the list by their ID, in a hashtable which is maintained internally by the library. Depending on the javascript implementation, this implies storage (memory) requirements of O(n^2).

Usage

list = new LinkedList();
list.insert("a");
// => true
const node = list.getHeadNode();
node.id;
// => "c12Bzz81"
list.findById("c12Bzz81") == node;
// => true

API

The original doubly-linked-list documentation can be found on Jason Jones github page for the original library. On this page I'll only provide the documentation for features added in this fork.

.findByID(id: string)

This will return the node in the list which corresponds with the passed ID string.

Keywords

FAQs

Package last updated on 10 Jun 2019

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