Naturally Produced Modules
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

pair-me-up

0.1.0 • Public • Published

pair-me-up

Gives a range, each paired with one another

NPM

Usage

var pair = require('pair-me-up');
var pairs = pair(1, 30);
 
console.log(pairs);
// [[1, 5], [2, 17], [3, 2], [4, 10], ...]

You can also shuffle the resulting pairs:

var pair = require('pair-me-up');
var pairs = pair(1, 5, true);
 
console.log(pairs);
// [[3, 2], [5, 1], [2, 5], [4, 2], ...]

view on requirebin

Keywords

none

install

npm i pair-me-up

Downloadsweekly downloads

4

version

0.1.0

license

ISC

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar