0.0.4 • Published 9 years ago

obj-merge v0.0.4

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

obj-merge

Build Status npm install

accumulate some object properties

usage

var objm = require('obj-merge')

var cliOptions = {
    flags: ['norecurse', 'skipdotfiles']
  , files: 'good.md'
  , cat: 'Black Cat'
}

var configOptions = {
    flags: ['verbose', 'debug']
  , book: {name: 'Pet Sematary'}
}

var misc = {
    flags: 'makeabeep'
  , files: 'test.txt'
  , book: true
}

console.log(objm(cliOptions, configOptions, misc)) // =>

/*
{
    flags: ['norecurse', 'skipdotfiles', 'verbose', 'debug', 'makeabeep']
  , files: ['good.md', 'test.txt']
  , book: [{name: 'Pet Sematary'}, true]
  , cat: 'Black Cat'
}
*/

throw any number of objects at it (even 0) and it will return an object with all of their top-level keys combined.

license

MIT

0.0.4

9 years ago

0.0.3

9 years ago

0.0.2

10 years ago

0.0.1

11 years ago

0.0.0

11 years ago