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

deepie-merge

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

deepie-merge

Yay, another deep merge

  • 1.3.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
151
increased by2.72%
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(dst, src, options)

  • dst any: Destination value
  • src 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: 10

© silverwind, distributed under BSD licence

FAQs

Package last updated on 23 May 2024

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