pjax
Version:
Easily enable fast AJAX navigation on any website (using pushState + XHR)
22 lines (18 loc) • 443 B
JavaScript
module.exports = function(target) {
if (target == null) {
return null;
}
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;
};