Skip to content

Enumerate all the possibilities, given an object with iterable values

License

Notifications You must be signed in to change notification settings

SivanMehta/spread-out

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

spread-out

npm (scoped) GitHub Build Status

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

About

Enumerate all the possibilities, given an object with iterable values

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published