You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

17 line
286 B

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