Comparing version 1.1.2 to 1.1.3
@@ -47,2 +47,13 @@ import objectMergeDeep from '../objectMergeDeep'; | ||
}); | ||
it('should deep merge two object with new keys', function () { | ||
expect(objectMergeDeep({}, { | ||
foo: { | ||
bar: 1 | ||
} | ||
})).toEqual({ | ||
foo: { | ||
bar: 1 | ||
} | ||
}); | ||
}); | ||
}); |
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
export default function objectMergeDeep(base) { | ||
export default function objectMergeDeep() { | ||
var base = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | ||
for (var i = 0, len = arguments.length <= 1 ? 0 : arguments.length - 1; i < len; ++i) { | ||
@@ -5,0 +7,0 @@ var obj = i + 1 < 1 || arguments.length <= i + 1 ? undefined : arguments[i + 1]; |
@@ -54,2 +54,13 @@ "use strict"; | ||
}); | ||
it('should deep merge two object with new keys', function () { | ||
expect((0, _objectMergeDeep2["default"])({}, { | ||
foo: { | ||
bar: 1 | ||
} | ||
})).toEqual({ | ||
foo: { | ||
bar: 1 | ||
} | ||
}); | ||
}); | ||
}); |
@@ -10,3 +10,5 @@ "use strict"; | ||
function objectMergeDeep(base) { | ||
function objectMergeDeep() { | ||
var base = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | ||
for (var i = 0, len = arguments.length <= 1 ? 0 : arguments.length - 1; i < len; ++i) { | ||
@@ -13,0 +15,0 @@ var obj = i + 1 < 1 || arguments.length <= i + 1 ? undefined : arguments[i + 1]; |
{ | ||
"name": "fast-loops", | ||
"version": "1.1.2", | ||
"version": "1.1.3", | ||
"description": "Small, performant & immutable iteration utilities for Arrays and Objects", | ||
@@ -5,0 +5,0 @@ "main": "lib/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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
92964
2649
0