Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

https://github.com/superisaac/node-jumplist

Yet another implement of skiplist in nodejs
https://github.com/superisaac/node-jumplist

Last synced: 5 days ago
JSON representation

Yet another implement of skiplist in nodejs

Lists

README

        

skiplist
========

Yet another implement of skiplist in nodejs

Install
========
```
npm install jumplist
```

Examples
========
```
var JumpList = require('jumplist');
var list = new JumpList();
list.set('a', 5);
list.set('b', 6);
list.set('c', 8);
list.set('d', 9);
list.get('b');
>>> 6
list.remove('a');
list.get('a');
>>> undefined

list.range('c', 'e', function(key, value) {
console.info('=', key, value);
});
>> = c 8
>> = d 9

list.getAt(0);
>> {key: 'b', value: 6}

list.getAt(2);
>> {key: 'd', value: 9}

```