JSPM

intrusive-linked-list

1.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 7
  • Score
    100M100P100Q36181F
  • License MIT

Intrusively linked list library for TypeScript.

Package Exports

  • intrusive-linked-list

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 (intrusive-linked-list) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

intrusive-linked-list

A library for supporting intrusively linked lists in TypeScript.

Example

class MyNodeClass implements ListEmbeddable<MyNodeClass> {
    value:Number;
    next:ListEmbeddable<MyNodeClass>;
    prev:ListEmbeddable<MyNodeClass>;
};

function createNodeWithValue(value:Number) {
    return {value, next:null, prev:null};
}

var list = createList<MyNodeClass>();
list.add(createNodeWithValue(1));
list.add(createNodeWithValue(2));
list.add(createNodeWithValue(9));
list.add(createNodeWithValue(-13));
for(var i = list.front(); i != list.front().prev; i = i.next) {
    console.log((i as MyNodeClass).value);
}

Release Notes

1.0.0

Initial release.