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

npmnpm
Version
1.0.2
Version published
Weekly downloads
4.6K
22.05%
Maintainers
1
Weekly downloads
 
Created
Source

concat-merge

Recursively merge configs for webpack/rollup.

Comparison

namesizeimmutableconcatdedupeclonemultiple parametersrecommended
concat-mergeconcat-mergetruetruefalsetrueyesyes
merge-deepmerge-deeptruetruetruetrueyesyes
deepmergedeepmergetruetruefalsefalse (option)no
lodash/mergelodash.mergefalsefalsefalsetrueyes
lodash/mergeWithlodash.mergewithfalsefalse (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 30 Jan 2021

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