assign.js 286 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 'use strict' // simple mutable assign function assign () { const args = [].slice.call(arguments).filter(i => i) const dest = args.shift() args.forEach(src => { Object.keys(src).forEach(key => { dest[key] = src[key] }) }) return dest } module.exports = assign