Files
pjax/lib/util/extend.js

22 lines
437 B
JavaScript
Raw Normal View History

module.exports = function(target) {
if (target == null) {
2018-03-20 18:42:39 -04:00
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
}