Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

object-merger

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

object-merger

Deep merge objects, better version of native Object.assign.

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
14
increased by75%
Maintainers
1
Weekly downloads
 
Created
Source

Object Merger

Merge Objects properly instead of overwriting them. Essentially a deep Object.assign. It's very simple, written in ES6+ and handles a basic deep copy of objects.

This was written out of frustrations with Object.assign and the heavier weight of some alternative packages trying to support everything.

Usage

const merge = require('object-merger');
const obj4 = merge(obj1, obj2, obj3); // returns a new object, doesn't modify existing.

Optionally you could add a static to the Object

Object.merge = require('object-merger');
const obj4 = Object.merge(obj1, obj2, obj3); // returns a new object, doesn't modify existing.

Check out the test folder for more!

Installation

$ npm install object-merger

Features

  • Merge multiple objects instead of overwrite them.
  • Simple, fast, light-weight with no external dependencies
  • Written in ES6+ for node.js 6+
  • Test driven

Options

As many objects as you'd like to merge from left to right.

Tests

From the package

$ npm test

License

MIT

Keywords

FAQs

Package last updated on 27 Mar 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc