summaryrefslogtreecommitdiffstats
path: root/node_modules/object.assign/implementation.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/object.assign/implementation.js')
-rw-r--r--node_modules/object.assign/implementation.js42
1 files changed, 0 insertions, 42 deletions
diff --git a/node_modules/object.assign/implementation.js b/node_modules/object.assign/implementation.js
deleted file mode 100644
index 567efe9..0000000
--- a/node_modules/object.assign/implementation.js
+++ /dev/null
@@ -1,42 +0,0 @@
-'use strict';
-
-// modified from https://github.com/es-shims/es6-shim
-var keys = require('object-keys');
-var canBeObject = function (obj) {
- return typeof obj !== 'undefined' && obj !== null;
-};
-var hasSymbols = require('has-symbols/shams')();
-var callBound = require('call-bind/callBound');
-var toObject = Object;
-var $push = callBound('Array.prototype.push');
-var $propIsEnumerable = callBound('Object.prototype.propertyIsEnumerable');
-var originalGetSymbols = hasSymbols ? Object.getOwnPropertySymbols : null;
-
-// eslint-disable-next-line no-unused-vars
-module.exports = function assign(target, source1) {
- if (!canBeObject(target)) { throw new TypeError('target must be an object'); }
- var objTarget = toObject(target);
- var s, source, i, props, syms, value, key;
- for (s = 1; s < arguments.length; ++s) {
- source = toObject(arguments[s]);
- props = keys(source);
- var getSymbols = hasSymbols && (Object.getOwnPropertySymbols || originalGetSymbols);
- if (getSymbols) {
- syms = getSymbols(source);
- for (i = 0; i < syms.length; ++i) {
- key = syms[i];
- if ($propIsEnumerable(source, key)) {
- $push(props, key);
- }
- }
- }
- for (i = 0; i < props.length; ++i) {
- key = props[i];
- value = source[key];
- if ($propIsEnumerable(source, key)) {
- objTarget[key] = value;
- }
- }
- }
- return objTarget;
-};