'use strict'

var hasSymbols = require('./has-symbols')
var forOwn     = require('./forOwn')
var toObject   = require('../lang/toObject')

var propIsEnumerable = Object.prototype.propertyIsEnumerable

// pure function now. Object.assign is in node and therefore
// I will use directly. Otherwise this. Differs from object/extend
// in that this will handle smybols.

module.exports = function (target, source) {
  var from
  var to = toObject(target)
  var symbols
  var s = 0
  var alen = arguments.length

  while (++s < alen) {
    from = Object(arguments[s])

    forOwn(from, (val, key) => {
      to[key] = from[key]
    })

    if (hasSymbols(from)) {
      symbols = hasSymbols(from)
      var i = -1
      var slen = symbols.length

      while (++i < slen) {
        if (propIsEnumerable.call(from, symbols[i])) {
          to[symbols[i]] = from[symbols[i]]
        }
      }
    }
  }

  return to
}

@@ -7,16 +7,71 @@
 trict'%0A%0A
+var isPropEnumerable = require('./is-prop-enumerable')%0A
 var hasS
@@ -77,16 +77,22 @@
 Symbols 
+      
 = requir
@@ -121,24 +121,30 @@
  forOwn     
+      
 = require('.
@@ -168,16 +168,22 @@
 bject   
+      
 = requir
@@ -209,70 +209,8 @@
 ')%0A%0A
-var propIsEnumerable = Object.prototype.propertyIsEnumerable%0A%0A
 // p
@@ -335,16 +335,33 @@
 xtend%0A//
+ and object/xtend
  in that
@@ -361,20 +361,22 @@
 in that 
-this
+assign
  will ha
@@ -394,32 +394,22 @@
 s.%0A%0A
-module.exports = 
 functio
+n assig
 n (t
@@ -688,19 +688,37 @@
 mbols = 
-has
+Object.getOwnProperty
 Symbols(
@@ -816,14 +816,14 @@
 if (
-p
+isP
 rop
-Is
 Enum
@@ -832,13 +832,8 @@
 able
-.call
 (fro
@@ -937,8 +937,33 @@
 rn to%0A%7D%0A
+%0Amodule.exports = assign%0A

update object/assign — reformat use is-prop-enumerable, update comments