Skip to content

Commit

Permalink
fix(Object.assignDeep): relax input validation
Browse files Browse the repository at this point in the history
  • Loading branch information
medikoo committed Oct 13, 2017
1 parent 11767aa commit 1baf57d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions object/assign-deep.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ var includes = require("../array/#/contains")
, uniq = require("../array/#/uniq")
, objForEach = require("./for-each")
, isPlainObject = require("./is-plain-object")
, ensureObject = require("./valid-object");
, ensureValue = require("./valid-value");

var isArray = Array.isArray, slice = Array.prototype.slice;

Expand All @@ -28,6 +28,6 @@ var deepAssign = function (source, target) {

module.exports = function (target /*, ...objects*/) {
return uniq
.call([ensureObject(target)].concat(slice.call(arguments, 1).map(ensureObject)))
.call([ensureValue(target)].concat(slice.call(arguments, 1).map(ensureValue)))
.reduce(deepAssign);
};

0 comments on commit 1baf57d

Please sign in to comment.