in-overlapping-pairs

1.0.2 • Public • Published

in-overlapping-pairs

Build Status npm version

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([])
// > [[]]

License

ISC

Readme

Keywords

none

Package Sidebar

Install

npm i in-overlapping-pairs

Weekly Downloads

0

Version

1.0.2

License

ISC

Last publish

Collaborators

  • overtcode