aboutsummaryrefslogtreecommitdiff
path: root/node_modules/fs-extra/lib/util/assign.js
blob: 317e5ec4ab10e6cf9e4e139de49fc4fa969f124e (plain)
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