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

@hckrnews/deep-merge

Package Overview
Dependencies
Maintainers
2
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hckrnews/deep-merge

Object deep merge

  • 0.3.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

Object deep merge

NPM version Coverage Quality Gate Status Bugs Code Smells Technical Debt Vulnerabilities Maintainability Rating Reliability Rating Security Rating

Deep merge objects.

Zero dependencies.

Installation

npm install @hckrnews/deep-merge or yarn add @hckrnews/deep-merge

Test the package

npm run test or yarn test

How to use

npm i @hckrnews/deep-merge

import { deepMerge } from '@hcklrnews/deep-merge';

const obj1 = {
    a: 1,
    b: 1,
    c: { x: 1, y: 1 },
    d: [1, 1]
}
const obj2 = {
    b: 2,
    c: { y: 2, z: 2 },
    d: [2, 2],
    e: 2
}
const result = deepMerge(obj1, obj2)

const expectedResult = {
    a: 1,
    b: 2,
    c: { x: 1, y: 2, z: 2 },
    d: [1, 1, 2, 2],
    e: 2
}

Keywords

FAQs

Package last updated on 14 Mar 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