npm.io
1.0.0 • Published 4 years ago

@data-structure/skip-list

Licence
AGPL-3.0
Version
1.0.0
Deps
2
Size
600 kB
Vulns
0
Weekly
0
Install scriptsThis package runs scripts during installation (preinstall/install/postinstall)

@data-structure/skip-list

Skip list data structure for JavaScript. See docs.

Depending on your environment, the code may require regeneratorRuntime to be defined, for instance by importing regenerator-runtime/runtime.

import {decreasing} from '@total-order/primitive';
import {range} from '@iterable-iterator/range';
import {SkipList} from '@data-structure/skip-list';
const list = SkipList.from(decreasing, range(10000));
[...list]; // [9999, 9998, ...]
list.add(...)
list.get(...)
list.has(...)
list.remove(...)

License Version Tests Dependencies GitHub issues Downloads

Code issues Code maintainability Code coverage (cov) Code technical debt Documentation Package size

Keywords