Maps the given array into pairs of overlapping elements in subarrays
npm install in-overlapping-pairs
import inOverlappingPairs from 'inOverlappingPairs'
inOverlappingPairs([1,2,3,4,5,6])
// > [[1,2], [2,3], [3,4], [4,5], [5,6]]
An empty array maps to an empty subarray:
inOverlappingPairs([])
// > [[]]