JSPM

  • Created
  • Published
  • Downloads 236
  • Score
    100M100P100Q94127F
  • License MIT

An unprotected bi-directional linked list. Useful for implementing other collections.

Package Exports

  • @tsdotnet/linked-node-list
  • @tsdotnet/linked-node-list/dist-esm/LinkedNodeList.js
  • @tsdotnet/linked-node-list/dist/LinkedNodeList
  • @tsdotnet/linked-node-list/dist/LinkedNodeList.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@tsdotnet/linked-node-list) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

alt text tsdotnet / linked-node-list

GitHub license 100% code coverage npm-publish npm version

An unprotected bi-directional linked list. Useful for implementing other collections or for managing custom nodes (links).

If you are looking for a protected and value focused linked list: github.com/tsdotnet/linked-list

Docs

tsdotnet.github.io/linked-node-list

This class is useful for managing a list of linked nodes, but it does not protect against modifying individual links. If the consumer modifies a link (sets the previous or next value) it will effectively break the collection.

It is possible to declare a node type of any kind as long as it contains a previous and next value that can reference another node. Although not as safe as a protected linked list, this class has less overhead and is more flexible.

The count (or length) of this LinkedNodeList is tracked as .unsafeCount and calling .getCount() will iterate the list.

A perfect example of the use of LinkedNodeList is with LinkedList as it uses it for its internal collection.