deepmerge
Advanced tools
Comparing version 4.1.1 to 4.1.2
@@ -82,8 +82,8 @@ 'use strict'; | ||
function deepmerge(target, source, options) { | ||
options = Object.assign({ | ||
arrayMerge: defaultArrayMerge, | ||
isMergeableObject: isMergeableObject | ||
}, options, { | ||
cloneUnlessOtherwiseSpecified: cloneUnlessOtherwiseSpecified | ||
}); | ||
options = options || {}; | ||
options.arrayMerge = options.arrayMerge || defaultArrayMerge; | ||
options.isMergeableObject = options.isMergeableObject || isMergeableObject; | ||
// cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge() | ||
// implementations can use it. The caller may not replace it. | ||
options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified; | ||
@@ -90,0 +90,0 @@ var sourceIsArray = Array.isArray(source); |
@@ -86,8 +86,8 @@ (function (global, factory) { | ||
function deepmerge(target, source, options) { | ||
options = Object.assign({ | ||
arrayMerge: defaultArrayMerge, | ||
isMergeableObject: isMergeableObject | ||
}, options, { | ||
cloneUnlessOtherwiseSpecified: cloneUnlessOtherwiseSpecified | ||
}); | ||
options = options || {}; | ||
options.arrayMerge = options.arrayMerge || defaultArrayMerge; | ||
options.isMergeableObject = options.isMergeableObject || isMergeableObject; | ||
// cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge() | ||
// implementations can use it. The caller may not replace it. | ||
options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified; | ||
@@ -94,0 +94,0 @@ var sourceIsArray = Array.isArray(source); |
12
index.js
@@ -57,8 +57,8 @@ var defaultIsMergeableObject = require('is-mergeable-object') | ||
function deepmerge(target, source, options) { | ||
options = Object.assign({ | ||
arrayMerge: defaultArrayMerge, | ||
isMergeableObject: defaultIsMergeableObject | ||
}, options, { | ||
cloneUnlessOtherwiseSpecified: cloneUnlessOtherwiseSpecified | ||
}) | ||
options = options || {} | ||
options.arrayMerge = options.arrayMerge || defaultArrayMerge | ||
options.isMergeableObject = options.isMergeableObject || defaultIsMergeableObject | ||
// cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge() | ||
// implementations can use it. The caller may not replace it. | ||
options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified | ||
@@ -65,0 +65,0 @@ var sourceIsArray = Array.isArray(source) |
@@ -12,3 +12,3 @@ { | ||
], | ||
"version": "4.1.1", | ||
"version": "4.1.2", | ||
"homepage": "https://github.com/TehShrike/deepmerge", | ||
@@ -30,13 +30,13 @@ "repository": { | ||
"devDependencies": { | ||
"@types/node": "^8.10.49", | ||
"@types/node": "^8.10.54", | ||
"is-mergeable-object": "1.1.0", | ||
"is-plain-object": "^2.0.4", | ||
"jsmd": "^1.0.1", | ||
"rollup": "^1.15.5", | ||
"rollup-plugin-commonjs": "^10.0.0", | ||
"rollup-plugin-node-resolve": "^5.0.2", | ||
"tape": "^4.10.2", | ||
"jsmd": "^1.0.2", | ||
"rollup": "^1.23.1", | ||
"rollup-plugin-commonjs": "^10.1.0", | ||
"rollup-plugin-node-resolve": "^5.2.0", | ||
"tape": "^4.11.0", | ||
"ts-node": "7.0.1", | ||
"typescript": "=2.2.2", | ||
"uglify-js": "^3.6.0" | ||
"uglify-js": "^3.6.1" | ||
}, | ||
@@ -43,0 +43,0 @@ "license": "MIT", |
27082