- Make `options` parameter optional - Allow partial overriding of instance options when calling `loadUrl` directly - Make `requestOptions` optional - Document `loadUrl` usage and provide examples
22 lines
439 B
JavaScript
22 lines
439 B
JavaScript
module.exports = function(target) {
|
|
if (target == null) {
|
|
return target
|
|
}
|
|
|
|
var to = Object(target)
|
|
|
|
for (var i = 1; i < arguments.length; i++) {
|
|
var source = arguments[i]
|
|
|
|
if (source != null) {
|
|
for (var key in source) {
|
|
// Avoid bugs when hasOwnProperty is shadowed
|
|
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
to[key] = source[key]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return to
|
|
}
|