GT2/GT2-iOS/node_modules/xtend/index.js

26 lines
474 B
JavaScript
Raw Normal View History

2018-02-12 17:26:06 +00:00
var Keys = require("object-keys")
var hasKeys = require("./has-keys")
module.exports = extend
function extend() {
var target = {}
for (var i = 0; i < arguments.length; i++) {
var source = arguments[i]
if (!hasKeys(source)) {
continue
}
var keys = Keys(source)
for (var j = 0; j < keys.length; j++) {
var name = keys[j]
target[name] = source[name]
}
}
return target
}