array-to-ranges (npm): Creates range objects from an sorted array and predicate.
Keywords: array|range|utility