merge-objects
Merge two objects and concatenate arrays that are values of the same object key.
Last updated 6 years ago by shevaroller .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install merge-objects 
SYNC missed versions from official npm registry.

node-merge-objects

Merge two objects and concatenate arrays that are values of the same object key.

Similar to extend in JQuery, but with arrays concatenation. Does deep merging too.

Build Status

Installation

npm install merge-objects --save

Usage

var merge = require('merge-objects');

var object1 = {a: 1, b: [2, 3]};
var object2 = {b: [4, 5], c: 6};

var result = merge(object1, object2);
console.log(result); //logs {a: 1, b: [2, 3, 4, 5], c: 6}

License

MIT

Current Tags

  • 1.0.5                                ...           latest (6 years ago)

6 Versions

  • 1.0.5                                ...           6 years ago
  • 1.0.4                                ...           6 years ago
  • 1.0.3                                ...           6 years ago
  • 1.0.2                                ...           6 years ago
  • 1.0.1                                ...           6 years ago
  • 1.0.0                                ...           6 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 0
Last Month 1
Dependencies (0)
None
Dev Dependencies (0)
None

Copyright 2014 - 2021 © npmmirror.com |