aboutsummaryrefslogtreecommitdiff
path: root/node_modules/extend/index.js
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2017-05-24 15:10:37 +0200
committerFlorian Dold <florian.dold@gmail.com>2017-05-24 15:11:17 +0200
commit7a3df06eb573d36142bd1a8e03c5ce8752d300b3 (patch)
tree70bfaea8884c374876f607774850a3a51c0cb381 /node_modules/extend/index.js
parentaca1143cb9eed16cf37f04e475e4257418dd18ac (diff)
fix build issues and add typedoc
Diffstat (limited to 'node_modules/extend/index.js')
-rw-r--r--node_modules/extend/index.js16
1 files changed, 8 insertions, 8 deletions
diff --git a/node_modules/extend/index.js b/node_modules/extend/index.js
index f5ec75d52..bbe53f660 100644
--- a/node_modules/extend/index.js
+++ b/node_modules/extend/index.js
@@ -26,17 +26,17 @@ var isPlainObject = function isPlainObject(obj) {
// Own properties are enumerated firstly, so to speed up,
// if last one is own, then all properties are own.
var key;
- for (key in obj) {/**/}
+ for (key in obj) { /**/ }
return typeof key === 'undefined' || hasOwn.call(obj, key);
};
module.exports = function extend() {
- var options, name, src, copy, copyIsArray, clone,
- target = arguments[0],
- i = 1,
- length = arguments.length,
- deep = false;
+ var options, name, src, copy, copyIsArray, clone;
+ var target = arguments[0];
+ var i = 1;
+ var length = arguments.length;
+ var deep = false;
// Handle a deep copy situation
if (typeof target === 'boolean') {
@@ -44,7 +44,8 @@ module.exports = function extend() {
target = arguments[1] || {};
// skip the boolean and the target
i = 2;
- } else if ((typeof target !== 'object' && typeof target !== 'function') || target == null) {
+ }
+ if (target == null || (typeof target !== 'object' && typeof target !== 'function')) {
target = {};
}
@@ -83,4 +84,3 @@ module.exports = function extend() {
// Return the modified object
return target;
};
-