Socket
Book a DemoInstallSign in
Socket

concat-merge

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

concat-merge

Recursively merge objects

1.2.0
latest
npmnpm
Version published
Weekly downloads
2.6K
-17.94%
Maintainers
1
Weekly downloads
 
Created
Source

concat-merge

test workflow

Recursively merge objects, especially for webpack/rollup configs.

Comparison

nameimmutableconcatdedupeclonemultiple parametersrecommended
concat-merge
concat-merge
truetruefalsetruenoyes
merge-deep
merge-deep
truetruetruetrueyesyes
deepmerge
deepmerge
truetruefalsefalse (option)no
lodash/merge
lodash.merge
falsefalsefalsetrueyes
lodash/mergeWith
lodash.mergewith
falsefalse (option)false (option)trueyesyes

Install

npm install concat-merge

Usage

import concatMerge from 'concat-merge'

concatMerge(baseConfig, {
  input: 'entry.js',
  plugins: [inject({React: 'react'})],
})

lodash equivalent:

import mergeWith from 'lodash/mergeWith'

const concatMerge = (...args) =>
  mergeWith({}, ...args, (prev, next) => {
    if (Array.isArray(prev)) {
      return prev.concat(next)
    }
  })

Keywords

gogen

FAQs

Package last updated on 15 Aug 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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.