Socket
Socket
Sign inDemoInstall

merge-anything

Package Overview
Dependencies
Maintainers
1
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

merge-anything - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

2

dist/index.cjs.js

@@ -45,3 +45,3 @@ 'use strict';

if (isWhat.isObject(newVal)) {
carry[key] = mergeRecursively(targetVal, newVal);
carry[key] = mergeRecursively(targetVal, newVal, extensions);
return carry;

@@ -48,0 +48,0 @@ } // all the rest

@@ -41,3 +41,3 @@ import { isObject, isArray } from 'is-what';

if (isObject(newVal)) {
carry[key] = mergeRecursively(targetVal, newVal);
carry[key] = mergeRecursively(targetVal, newVal, extensions);
return carry;

@@ -44,0 +44,0 @@ } // all the rest

{
"name": "merge-anything",
"version": "2.0.0",
"version": "2.0.1",
"description": "Merge two objects recursively. A simple & small integration.",

@@ -5,0 +5,0 @@ "main": "dist/index.cjs.js",

@@ -43,3 +43,3 @@ import { isObject, isArray } from 'is-what'

if (isObject(newVal)) {
carry[key] = mergeRecursively(targetVal, newVal)
carry[key] = mergeRecursively(targetVal, newVal, extensions)
return carry

@@ -46,0 +46,0 @@ }

@@ -72,9 +72,12 @@ import test from 'ava'

origin = {
someArray: ['a']
someArray: ['a'],
a: {b: {c: ['x']}}
}
target = {
someArray: ['b']
someArray: ['b'],
a: {b: {c: ['y']}}
}
res = merge(extensions, origin, target)
t.deepEqual(res, {someArray: ['a', 'b']})
t.deepEqual(res, {someArray: ['a', 'b'], a: {b: {c: ['x', 'y']}}})
// also works on base lvl
res = merge(extensions, ['a'], ['b'])

@@ -81,0 +84,0 @@ t.deepEqual(res, ['a', 'b'])

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