combine-properties

Generates all possible objects (combinations of property values).

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
combine-properties
000.1.07 years ago7 years agoMinified + gzip package size for combine-properties in KB

Readme

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