solist-js

1.0.0 • Public • Published

solist-js

Self-organizing list using the transpose heuristic

Installation

npm install solist-js

Example

var SOList = require('solist-js');
 
// Create new list.
var list = new SOList();
 
list.size(); // Returns number of elements in list.
list.empty(); // Returns true if list is empty. False otherwise.
list.get(key); // Returns element at key or undefined if not found. Expects key to be a String.
list.insert(key, foo); // Adds key with value foo. Expects key to be a String, and value to be of any type.
list.remove(key); // Deletes key and its value from the list. Expects key to be a string.

Test

npm run test

Readme

Keywords

none

Package Sidebar

Install

npm i solist-js

Weekly Downloads

2

Version

1.0.0

License

MPL 2.0

Last publish

Collaborators

  • crzrcn