You cannot 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
JavaScript
18 lines
369 B
JavaScript
5 years ago
|
module.exports = extend
|
||
|
|
||
|
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
||
|
|
||
|
function extend(target) {
|
||
|
for (var i = 1; i < arguments.length; i++) {
|
||
|
var source = arguments[i]
|
||
|
|
||
|
for (var key in source) {
|
||
|
if (hasOwnProperty.call(source, key)) {
|
||
|
target[key] = source[key]
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
return target
|
||
|
}
|