Files
pjax/lib/util/extend.js
Robin North aa615b4d6c loadUrl enhancements
- Make `options` parameter optional
- Allow partial overriding of instance options when calling `loadUrl` directly
- Make `requestOptions` optional
- Document `loadUrl` usage and provide examples
2018-03-04 16:00:55 +00:00

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
}