raptor-util
Advanced tools
Comparing version 1.0.3 to 1.0.4
@@ -1,8 +0,11 @@ | ||
module.exports = function extend(target, source) { //A simple function to copy properties from one project to another | ||
module.exports = function extend(target, source) { //A simple function to copy properties from one object to another | ||
if (!target) { //Check if a target was provided, otherwise create a new empty object to return | ||
target = {}; | ||
} | ||
for (var propName in source) { | ||
if (source.hasOwnProperty(propName)) { //Only look at source properties that are not inherited | ||
target[propName] = source[propName]; //Copy the property | ||
if (source) { | ||
for (var propName in source) { | ||
if (source.hasOwnProperty(propName)) { //Only look at source properties that are not inherited | ||
target[propName] = source[propName]; //Copy the property | ||
} | ||
} | ||
@@ -9,0 +12,0 @@ } |
@@ -25,3 +25,3 @@ { | ||
}, | ||
"version": "1.0.3" | ||
"version": "1.0.4" | ||
} |
22095
580