documentit/node_modules/fs-extra/lib/util/assign.js
2018-01-05 10:48:13 -08:00

15 lines
303 B
JavaScript

// simple mutable assign
function assign () {
var args = [].slice.call(arguments).filter(function (i) { return i })
var dest = args.shift()
args.forEach(function (src) {
Object.keys(src).forEach(function (key) {
dest[key] = src[key]
})
})
return dest
}
module.exports = assign