spread-out

1.0.1 • Public • Published

spread out

Spread out all of the possibilities, given an object with iterable values

Installation

npm install spread-out

Usage

const spread = require('spread-out');
 
const lineup = {
  hero: ['Goku', 'Vegeta'],
  villian: ['Frieza', 'Cell']
};
 
const battles = spread(lineup);
console.log(battles);
 
/*
[ { hero: 'Goku', villian: 'Frieza' },
  { hero: 'Goku', villian: 'Cell' },
  { hero: 'Vegeta', villian: 'Frieza' },
  { hero: 'Vegeta', villian: 'Cell' } ]
 */

Tests

npm test

Readme

Keywords

Package Sidebar

Install

npm i spread-out

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

5.05 kB

Total Files

6

Last publish

Collaborators

  • sivanmehta