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: 3 months ago
JSON representation
Yet another implement of skiplist in nodejs
- Host: GitHub
- URL: https://github.com/superisaac/node-jumplist
- Owner: superisaac
- License: unlicense
- Created: 2014-09-19T08:02:59.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2014-09-19T08:11:24.000Z (about 10 years ago)
- Last Synced: 2024-07-05T18:11:27.893Z (4 months ago)
- Language: JavaScript
- Size: 133 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-nodejs-pure-js - node-jumplist(skiplist)
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');
>>> undefinedlist.range('c', 'e', function(key, value) {
console.info('=', key, value);
});
>> = c 8
>> = d 9list.getAt(0);
>> {key: 'b', value: 6}list.getAt(2);
>> {key: 'd', value: 9}```