in-overlapping-pairs
v1.0.2
Published
Maps out pairs of elements in subarrays
Downloads
2
Readme
in-overlapping-pairs
Maps the given array into pairs of overlapping elements in subarrays
Install
npm install in-overlapping-pairs
Usage
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([])
// > [[]]