Socket
Book a DemoInstallSign in
Socket

deepie-merge

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

deepie-merge

Yay, another deep merge

latest
Source
npmnpm
Version
1.3.4
Version published
Weekly downloads
248
9.73%
Maintainers
1
Weekly downloads
 
Created
Source

deepie-merge

Yay, another deep merge

Usage

npm i deepie-merge
import {deepMerge} from "deepie-merge";

deepMerge({a: [1]}, {a: [2]});
// => {a: [2]}

deepMerge({a: [1]}, {a: [2]}, {arrayExtend: true});
// => {a: [1, 2]}

deepMerge({a: [1], b: [1]}, {a: [2], b: [2]}, {arrayExtend: ["a"]});
// => {a: [1, 2], b: [2]}

API

deepMerge(a, b, options)

Deep-merge b into a.

  • a any: Destination value
  • b any: Source value
  • options object:
    • arrayExtend boolean or string[]: Whether to extend arrays instead of replacing them. When passed a string array, it will only extend the object keys provided in that array.
    • maxRecursions number: Amount of nesting levels to recurse into. Default: 20

© silverwind, distributed under BSD licence

FAQs

Package last updated on 21 Aug 2025

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