JSPM

combine-properties

0.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2138
  • Score
    100M100P100Q120749F
  • License MIT

Generates all possible objects (combinations of property values).

Package Exports

  • combine-properties

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (combine-properties) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

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