sorted-key-buckets
Map a key to a bucket where the keys assigned to each bucket must be sorted. Creates new buckets as needed. used to make sorted string tables. (SST)
var keyBuckets = var buckets = ; var res = // returns ['a',false] res1 = start:'a' res = // returns ['c',{start:'a'}] res = // returns ['b',false] // to find out if this is a new bucket test the value of offset 1 if!res1 res1 = start:'b'; console// prints [['c',{start:'a'}],['b',{start:'b'}]]
in my use case the data associated with each bucket is an fs writestream