core-js-pure 3.6.0 → 3.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,7 +4,7 @@ var store = require('../internals/shared-store');
4
4
  (module.exports = function (key, value) {
5
5
  return store[key] || (store[key] = value !== undefined ? value : {});
6
6
  })('versions', []).push({
7
- version: '3.6.0',
7
+ version: '3.6.1',
8
8
  mode: IS_PURE ? 'pure' : 'global',
9
9
  copyright: '© 2019 Denis Pushkarev (zloirock.ru)'
10
10
  });
@@ -4,4 +4,4 @@ module.exports = NATIVE_SYMBOL
4
4
  // eslint-disable-next-line no-undef
5
5
  && !Symbol.sham
6
6
  // eslint-disable-next-line no-undef
7
- && typeof Symbol() == 'symbol';
7
+ && typeof Symbol.iterator == 'symbol';
@@ -7,7 +7,7 @@ var USE_SYMBOL_AS_UID = require('../internals/use-symbol-as-uid');
7
7
 
8
8
  var WellKnownSymbolsStore = shared('wks');
9
9
  var Symbol = global.Symbol;
10
- var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol : uid;
10
+ var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol : Symbol && Symbol.withoutSetter || uid;
11
11
 
12
12
  module.exports = function (name) {
13
13
  if (!has(WellKnownSymbolsStore, name)) {
@@ -83,7 +83,7 @@ var wrap = function (tag, description) {
83
83
  return symbol;
84
84
  };
85
85
 
86
- var isSymbol = NATIVE_SYMBOL && typeof $Symbol.iterator == 'symbol' ? function (it) {
86
+ var isSymbol = USE_SYMBOL_AS_UID ? function (it) {
87
87
  return typeof it == 'symbol';
88
88
  } : function (it) {
89
89
  return Object(it) instanceof $Symbol;
@@ -178,12 +178,20 @@ if (!NATIVE_SYMBOL) {
178
178
  return getInternalState(this).tag;
179
179
  });
180
180
 
181
+ redefine($Symbol, 'withoutSetter', function (description) {
182
+ return wrap(uid(description), description);
183
+ });
184
+
181
185
  propertyIsEnumerableModule.f = $propertyIsEnumerable;
182
186
  definePropertyModule.f = $defineProperty;
183
187
  getOwnPropertyDescriptorModule.f = $getOwnPropertyDescriptor;
184
188
  getOwnPropertyNamesModule.f = getOwnPropertyNamesExternal.f = $getOwnPropertyNames;
185
189
  getOwnPropertySymbolsModule.f = $getOwnPropertySymbols;
186
190
 
191
+ wrappedWellKnownSymbolModule.f = function (name) {
192
+ return wrap(wellKnownSymbol(name), name);
193
+ };
194
+
187
195
  if (DESCRIPTORS) {
188
196
  // https://github.com/tc39/proposal-Symbol-description
189
197
  nativeDefineProperty($Symbol[PROTOTYPE], 'description', {
@@ -198,12 +206,6 @@ if (!NATIVE_SYMBOL) {
198
206
  }
199
207
  }
200
208
 
201
- if (!USE_SYMBOL_AS_UID) {
202
- wrappedWellKnownSymbolModule.f = function (name) {
203
- return wrap(wellKnownSymbol(name), name);
204
- };
205
- }
206
-
207
209
  $({ global: true, wrap: true, forced: !NATIVE_SYMBOL, sham: !NATIVE_SYMBOL }, {
208
210
  Symbol: $Symbol
209
211
  });
@@ -1,6 +1,7 @@
1
1
  require('./es.array.iterator');
2
2
  var DOMIterables = require('../internals/dom-iterables');
3
3
  var global = require('../internals/global');
4
+ var classof = require('../internals/classof');
4
5
  var createNonEnumerableProperty = require('../internals/create-non-enumerable-property');
5
6
  var Iterators = require('../internals/iterators');
6
7
  var wellKnownSymbol = require('../internals/well-known-symbol');
@@ -10,7 +11,7 @@ var TO_STRING_TAG = wellKnownSymbol('toStringTag');
10
11
  for (var COLLECTION_NAME in DOMIterables) {
11
12
  var Collection = global[COLLECTION_NAME];
12
13
  var CollectionPrototype = Collection && Collection.prototype;
13
- if (CollectionPrototype && !CollectionPrototype[TO_STRING_TAG]) {
14
+ if (CollectionPrototype && classof(CollectionPrototype) !== TO_STRING_TAG) {
14
15
  createNonEnumerableProperty(CollectionPrototype, TO_STRING_TAG, COLLECTION_NAME);
15
16
  }
16
17
  Iterators[COLLECTION_NAME] = Iterators.Array;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "core-js-pure",
3
3
  "description": "Standard library",
4
- "version": "3.6.0",
4
+ "version": "3.6.1",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/zloirock/core-js.git"