Socket
Book a DemoInstallSign in
Socket

@remy/merge

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@remy/merge

Merge - like most tools, except also supports arrays

latest
Source
npmnpm
Version
1.0.2
Version published
Maintainers
1
Created
Source

What?

Another merge library, but I had a need to support merging objects who also had array properties (where as lodash's merge doesn't merge arrays, only objects).

Features:

  • Deep merge
  • Object merging
  • Array merge
  • Priority from right to left

Install

npm install --save @remy/merge

Usage

const result = merge(a, b);

Both a and b are untouched (i.e. this method doesn't mutate).

If a the same key appears as a primitive in a and b, then the value from b is in the result.

If the same key appears as an array or as an object, the result is the merged result.

FAQs

Package last updated on 15 Mar 2019

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