documentit/node_modules/fs-extra/lib/util/assign.js

15 lines
303 B
JavaScript
Raw Permalink Normal View History

2018-01-05 18:48:13 +00:00
// 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