From 81ddf9b700bc48a1f8e472209f080f9c1d9a9b09 Mon Sep 17 00:00:00 2001 From: Piotr Russ Date: Wed, 18 Nov 2020 23:26:45 +0100 Subject: rm node_modules --- node_modules/object.assign/hasSymbols.js | 43 -------------------------------- 1 file changed, 43 deletions(-) delete mode 100644 node_modules/object.assign/hasSymbols.js (limited to 'node_modules/object.assign/hasSymbols.js') diff --git a/node_modules/object.assign/hasSymbols.js b/node_modules/object.assign/hasSymbols.js deleted file mode 100644 index 34841e0..0000000 --- a/node_modules/object.assign/hasSymbols.js +++ /dev/null @@ -1,43 +0,0 @@ -'use strict'; - -var keys = require('object-keys'); - -module.exports = function hasSymbols() { - if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } - if (typeof Symbol.iterator === 'symbol') { return true; } - - var obj = {}; - var sym = Symbol('test'); - var symObj = Object(sym); - if (typeof sym === 'string') { return false; } - - if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } - if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } - - /* - * temp disabled per https://github.com/ljharb/object.assign/issues/17 - * if (sym instanceof Symbol) { return false; } - * temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 - * if (!(symObj instanceof Symbol)) { return false; } - */ - - var symVal = 42; - obj[sym] = symVal; - for (sym in obj) { return false; } // eslint-disable-line no-unreachable-loop - if (keys(obj).length !== 0) { return false; } - if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } - - if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } - - var syms = Object.getOwnPropertySymbols(obj); - if (syms.length !== 1 || syms[0] !== sym) { return false; } - - if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } - - if (typeof Object.getOwnPropertyDescriptor === 'function') { - var descriptor = Object.getOwnPropertyDescriptor(obj, sym); - if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } - } - - return true; -}; -- cgit v1.2.3