Skip to content

Commit 027edd0

Browse files
📚 docs(README): Add example.
1 parent 712771f commit 027edd0

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

README.md

+12
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,18 @@ See [docs](https://aureooms.github.io/js-skip-list/index.html).
77
> :warning: The code requires `regeneratorRuntime` to be defined, for instance by importing
88
> [regenerator-runtime/runtime](https://www.npmjs.com/package/regenerator-runtime).
99
10+
```js
11+
import {decreasing} from '@aureooms/js-compare';
12+
import {range} from '@aureooms/js-itertools';
13+
import SkipList from '@aureooms/js-skip-list';
14+
const list = SkipList.from(decreasing, range(10000));
15+
[...list]; // [9999, 9998, ...]
16+
list.add(...)
17+
list.get(...)
18+
list.has(...)
19+
list.remove(...)
20+
```
21+
1022
[![License](https://img.shields.io/github/license/aureooms/js-skip-list.svg)](https://raw.githubusercontent.com/aureooms/js-skip-list/master/LICENSE)
1123
[![Version](https://img.shields.io/npm/v/@aureooms/js-skip-list.svg)](https://www.npmjs.org/package/@aureooms/js-skip-list)
1224
[![Build](https://img.shields.io/travis/aureooms/js-skip-list/master.svg)](https://travis-ci.org/aureooms/js-skip-list/branches)

0 commit comments

Comments
 (0)