Balanced red-black interval tree for Javascript
const IntervalTree = require('rb-interval-tree');
const tree = new IntervalTree();
tree.insert(4, 7, 'foo');
const results = tree.search(0, 10);
tree.remove('foo');
const dup = tree.copy();
tree.visit((value, start, end) => {
console.log(value, start, end);
});