mirror of https://github.com/lukechilds/node.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
369 B
18 lines
369 B
10 years ago
|
module.exports = extend
|
||
|
|
||
9 years ago
|
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
||
|
|
||
10 years ago
|
function extend(target) {
|
||
|
for (var i = 1; i < arguments.length; i++) {
|
||
|
var source = arguments[i]
|
||
|
|
||
|
for (var key in source) {
|
||
9 years ago
|
if (hasOwnProperty.call(source, key)) {
|
||
10 years ago
|
target[key] = source[key]
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
return target
|
||
|
}
|