Intersect sorted lists using merge intersection with galloping lookahead
Intersect sorted lists using merge intersection with galloping lookahead.
npm install sorted-intersect
This is useful if you want to (effiently) intersect large sorted lists.
It is easy to use
var intersect = ;var intersection =;console; // prints [7,8,10]
intersect(lists, options) takes an optional second parameter
which can contain the following options
limit: number // limit the result to this numbermarker: value // start the intersection a this value,offsets: // use these list offsets (mutates the array)