QuentinRoy / pairwise

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pairwise

Build Status codecov dependencies Status devDependencies Status NPM version

Chunk an array into successive pairs. E.g. pairwise([1, 2, 3, 4]) yields [[1, 2], [2, 3], [3, 4]].

Installing / Getting started

npm i pairwise

Example

const pairwise = require('pairwise');
const chunks = pairwise([1, 2, 3, 4, 5]);

About

License:Other


Languages

Language:JavaScript 100.0%