combine-properties

0.1.0 • Public • Published

combine-properties

Generates all possible objects (combinations of property values).

Installation

npm i combine-properties --save

Usage

var combine = require('combine-properties')
var result = combine({
	a: [1, 2, 3],
	b: ['a', 'b']
})
// result[0] === { a: 1, b: 'a' }
// result[1] === { a: 2, b: 'a' }
// result[2] === { a: 3, b: 'a' }
// result[3] === { a: 1, b: 'b' }
// result[4] === { a: 2, b: 'b' }
// result[5] === { a: 3, b: 'b' }

License

MIT

Dependencies (0)

    Dev Dependencies (2)

    Package Sidebar

    Install

    npm i combine-properties

    Weekly Downloads

    389

    Version

    0.1.0

    License

    MIT

    Last publish

    Collaborators

    • titarenko