3 var isExtendable = require('is-extendable');
4 var assignSymbols = require('assign-symbols');
6 module.exports = Object.assign || function(obj/*, objects*/) {
7 if (obj === null || typeof obj === 'undefined') {
8 throw new TypeError('Cannot convert undefined or null to object');
13 for (var i = 1; i < arguments.length; i++) {
14 var val = arguments[i];
20 assignSymbols(obj, val);
26 function assign(a, b) {
34 function isString(val) {
35 return (val && typeof val === 'string');
38 function toObject(str) {
46 function isObject(val) {
47 return (val && typeof val === 'object') || isExtendable(val);
51 * Returns true if the given `key` is an own property of `obj`.
54 function hasOwn(obj, key) {
55 return Object.prototype.hasOwnProperty.call(obj, key);
58 function isEnum(obj, key) {
59 return Object.prototype.propertyIsEnumerable.call(obj, key);