2.5.0 • Published 7 years ago

object-combine v2.5.0

Weekly downloads
12
License
UNLICENSED
Repository
github
Last release
7 years ago

object-combine

npm npm CircleCI

me: Hey @ajithranka, how do I do something like this?
ajithranka: Ummm. Give me a minute.
...
npm publish

Combine two objects using a combineFunction.

Install

npm install object-combine

Example

var objectCombine = require('object-combine');

var items = {'chairs': 10, 'tables': 4};
var moreItems = {'chairs': 2, 'stools': 34};

var combineFunction = function (a, b) { return a + b; }

var combined = objectCombine(items, moreItems, combineFunction);
console.log(combined);
# {'chairs': 12, 'tables': 4, 'stools': 34}

Testing

# Install package dependencies.
npm install

# Run tests.
npm test
2.5.0

7 years ago

2.4.0

7 years ago

2.3.0

8 years ago

2.2.0

8 years ago

2.1.0

8 years ago

2.0.0

8 years ago