From e06ec920f7a5d784e674c4c4b4e6d1da3dc7391d Mon Sep 17 00:00:00 2001 From: Piotr Russ Date: Mon, 16 Nov 2020 00:10:28 +0100 Subject: api, login, auth --- node_modules/object.assign/implementation.js | 42 ++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 node_modules/object.assign/implementation.js (limited to 'node_modules/object.assign/implementation.js') diff --git a/node_modules/object.assign/implementation.js b/node_modules/object.assign/implementation.js new file mode 100644 index 0000000..567efe9 --- /dev/null +++ b/node_modules/object.assign/implementation.js @@ -0,0 +1,42 @@ +'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; +}; -- cgit v1.2.3