animate/webGl/my-threejs-test/node_modules/xtend/mutable.js

24 lines
452 B
JavaScript
Raw Normal View History

2024-06-24 09:24:00 +00:00
var hasKeys = require("./has-keys")
module.exports = extend
function extend(target) {
var sources = [].slice.call(arguments, 1)
for (var i = 0; i < sources.length; i++) {
var source = sources[i]
if (!hasKeys(source)) {
continue
}
for (var key in source) {
if (source.hasOwnProperty(key)) {
target[key] = source[key]
}
}
}
return target
}