@corex/deepmerge
Advanced tools
Comparing version 2.3.2 to 2.3.3
@@ -1,2 +0,2 @@ | ||
declare const _default: (_: any[], currArr: any[]) => any[]; | ||
declare const _default: (_: any[], currArr: any[]) => any; | ||
export default _default; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types | ||
exports.default = (obj) => { | ||
@@ -4,0 +5,0 @@ if (typeof obj === 'object' && obj !== null) { |
@@ -17,3 +17,5 @@ "use strict"; | ||
if (Array.isArray(prev[key]) && Array.isArray(curr[key])) { | ||
prev[key] = opts.arrayMerge(prev[key], curr[key]); | ||
if (opts && opts.arrayMerge) { | ||
prev[key] = opts.arrayMerge(prev[key], curr[key]); | ||
} | ||
} | ||
@@ -20,0 +22,0 @@ else if (is_object_1.isObject(prev[key]) && is_object_1.isObject(curr[key])) { |
@@ -127,2 +127,3 @@ "use strict"; | ||
}; | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
const customMergeFn = (_, __) => 42; | ||
@@ -129,0 +130,0 @@ expect(merge_1.default([obj1, obj2], { |
@@ -0,1 +1,2 @@ | ||
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types | ||
export default (obj) => { | ||
@@ -2,0 +3,0 @@ if (typeof obj === 'object' && obj !== null) { |
@@ -15,3 +15,5 @@ import { isObject } from '../is-object'; | ||
if (Array.isArray(prev[key]) && Array.isArray(curr[key])) { | ||
prev[key] = opts.arrayMerge(prev[key], curr[key]); | ||
if (opts && opts.arrayMerge) { | ||
prev[key] = opts.arrayMerge(prev[key], curr[key]); | ||
} | ||
} | ||
@@ -18,0 +20,0 @@ else if (isObject(prev[key]) && isObject(curr[key])) { |
@@ -122,2 +122,3 @@ import merge from './merge'; | ||
}; | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
const customMergeFn = (_, __) => 42; | ||
@@ -124,0 +125,0 @@ expect(merge([obj1, obj2], { |
{ | ||
"name": "@corex/deepmerge", | ||
"version": "2.3.2", | ||
"version": "2.3.3", | ||
"main": "./dist/cjs/index.js", | ||
@@ -5,0 +5,0 @@ "module": "./dist/esnext/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
18228
476