core-js-pure
Advanced tools
Comparing version 3.20.0 to 3.20.1
require('../../modules/es.map'); | ||
require('../../modules/es.object.to-string'); | ||
require('../../modules/esnext.array.group-by-to-map'); | ||
@@ -3,0 +4,0 @@ var entryUnbind = require('../../internals/entry-unbind'); |
var parent = require('../../stable/array'); | ||
require('../../modules/es.map'); | ||
require('../../modules/es.object.to-string'); | ||
require('../../modules/esnext.array.find-last'); | ||
@@ -4,0 +5,0 @@ require('../../modules/esnext.array.find-last-index'); |
require('../../../modules/es.map'); | ||
require('../../../modules/es.object.to-string'); | ||
require('../../../modules/esnext.array.group-by-to-map'); | ||
@@ -3,0 +4,0 @@ var entryVirtual = require('../../../internals/entry-virtual'); |
var parent = require('../../../stable/array/virtual'); | ||
require('../../../modules/es.map'); | ||
require('../../../modules/es.object.to-string'); | ||
require('../../../modules/esnext.array.find-last'); | ||
@@ -4,0 +5,0 @@ require('../../../modules/esnext.array.find-last-index'); |
@@ -7,3 +7,3 @@ var DESCRIPTORS = require('../internals/descriptors'); | ||
module.exports = !DESCRIPTORS && !fails(function () { | ||
// eslint-disable-next-line es/no-object-defineproperty -- requied for testing | ||
// eslint-disable-next-line es/no-object-defineproperty -- required for testing | ||
return Object.defineProperty(createElement('div'), 'a', { | ||
@@ -10,0 +10,0 @@ get: function () { return 7; } |
@@ -7,5 +7,5 @@ var IS_PURE = require('../internals/is-pure'); | ||
})('versions', []).push({ | ||
version: '3.20.0', | ||
version: '3.20.1', | ||
mode: IS_PURE ? 'pure' : 'global', | ||
copyright: '© 2021 Denis Pushkarev (zloirock.ru)' | ||
}); |
var $ = require('../internals/export'); | ||
var DESCRIPTORS = require('../internals/descriptors'); | ||
var objectDefinePropertyModile = require('../internals/object-define-property'); | ||
var objectDefinePropertyModule = require('../internals/object-define-property'); | ||
@@ -8,3 +8,3 @@ // `Object.defineProperty` method | ||
$({ target: 'Object', stat: true, forced: !DESCRIPTORS, sham: !DESCRIPTORS }, { | ||
defineProperty: objectDefinePropertyModile.f | ||
defineProperty: objectDefinePropertyModule.f | ||
}); |
@@ -27,2 +27,3 @@ 'use strict'; | ||
var perform = require('../internals/perform'); | ||
var Queue = require('../internals/queue'); | ||
var InternalStateModule = require('../internals/internal-state'); | ||
@@ -99,45 +100,46 @@ var isForced = require('../internals/is-forced'); | ||
var callReaction = function (reaction, state) { | ||
var value = state.value; | ||
var ok = state.state == FULFILLED; | ||
var handler = ok ? reaction.ok : reaction.fail; | ||
var resolve = reaction.resolve; | ||
var reject = reaction.reject; | ||
var domain = reaction.domain; | ||
var result, then, exited; | ||
try { | ||
if (handler) { | ||
if (!ok) { | ||
if (state.rejection === UNHANDLED) onHandleUnhandled(state); | ||
state.rejection = HANDLED; | ||
} | ||
if (handler === true) result = value; | ||
else { | ||
if (domain) domain.enter(); | ||
result = handler(value); // can throw | ||
if (domain) { | ||
domain.exit(); | ||
exited = true; | ||
} | ||
} | ||
if (result === reaction.promise) { | ||
reject(TypeError('Promise-chain cycle')); | ||
} else if (then = isThenable(result)) { | ||
call(then, result, resolve, reject); | ||
} else resolve(result); | ||
} else reject(value); | ||
} catch (error) { | ||
if (domain && !exited) domain.exit(); | ||
reject(error); | ||
} | ||
}; | ||
var notify = function (state, isReject) { | ||
if (state.notified) return; | ||
state.notified = true; | ||
var chain = state.reactions; | ||
microtask(function () { | ||
var value = state.value; | ||
var ok = state.state == FULFILLED; | ||
var index = 0; | ||
// variable length - can't use forEach | ||
while (chain.length > index) { | ||
var reaction = chain[index++]; | ||
var handler = ok ? reaction.ok : reaction.fail; | ||
var resolve = reaction.resolve; | ||
var reject = reaction.reject; | ||
var domain = reaction.domain; | ||
var result, then, exited; | ||
try { | ||
if (handler) { | ||
if (!ok) { | ||
if (state.rejection === UNHANDLED) onHandleUnhandled(state); | ||
state.rejection = HANDLED; | ||
} | ||
if (handler === true) result = value; | ||
else { | ||
if (domain) domain.enter(); | ||
result = handler(value); // can throw | ||
if (domain) { | ||
domain.exit(); | ||
exited = true; | ||
} | ||
} | ||
if (result === reaction.promise) { | ||
reject(TypeError('Promise-chain cycle')); | ||
} else if (then = isThenable(result)) { | ||
call(then, result, resolve, reject); | ||
} else resolve(result); | ||
} else reject(value); | ||
} catch (error) { | ||
if (domain && !exited) domain.exit(); | ||
reject(error); | ||
} | ||
var reactions = state.reactions; | ||
var reaction; | ||
while (reaction = reactions.get()) { | ||
callReaction(reaction, state); | ||
} | ||
state.reactions = []; | ||
state.notified = false; | ||
@@ -259,3 +261,3 @@ if (isReject && !state.rejection) onUnhandled(state); | ||
parent: false, | ||
reactions: [], | ||
reactions: new Queue(), | ||
rejection: false, | ||
@@ -271,10 +273,11 @@ state: PENDING, | ||
var state = getInternalPromiseState(this); | ||
var reactions = state.reactions; | ||
var reaction = newPromiseCapability(speciesConstructor(this, PromiseConstructor)); | ||
state.parent = true; | ||
reaction.ok = isCallable(onFulfilled) ? onFulfilled : true; | ||
reaction.fail = isCallable(onRejected) && onRejected; | ||
reaction.domain = IS_NODE ? process.domain : undefined; | ||
state.parent = true; | ||
reactions[reactions.length] = reaction; | ||
if (state.state != PENDING) notify(state, false); | ||
if (state.state == PENDING) state.reactions.add(reaction); | ||
else microtask(function () { | ||
callReaction(reaction, state); | ||
}); | ||
return reaction.promise; | ||
@@ -281,0 +284,0 @@ }, |
@@ -10,3 +10,3 @@ 'use strict'; | ||
var isExtensible = require('../internals/object-is-extensible'); | ||
var enforceIternalState = require('../internals/internal-state').enforce; | ||
var enforceInternalState = require('../internals/internal-state').enforce; | ||
var NATIVE_WEAK_MAP = require('../internals/native-weak-map'); | ||
@@ -41,3 +41,3 @@ | ||
if (isObject(key) && !isExtensible(key)) { | ||
var state = enforceIternalState(this); | ||
var state = enforceInternalState(this); | ||
if (!state.frozen) state.frozen = new InternalWeakMap(); | ||
@@ -49,3 +49,3 @@ return nativeDelete(this, key) || state.frozen['delete'](key); | ||
if (isObject(key) && !isExtensible(key)) { | ||
var state = enforceIternalState(this); | ||
var state = enforceInternalState(this); | ||
if (!state.frozen) state.frozen = new InternalWeakMap(); | ||
@@ -57,3 +57,3 @@ return nativeHas(this, key) || state.frozen.has(key); | ||
if (isObject(key) && !isExtensible(key)) { | ||
var state = enforceIternalState(this); | ||
var state = enforceInternalState(this); | ||
if (!state.frozen) state.frozen = new InternalWeakMap(); | ||
@@ -65,3 +65,3 @@ return nativeHas(this, key) ? nativeGet(this, key) : state.frozen.get(key); | ||
if (isObject(key) && !isExtensible(key)) { | ||
var state = enforceIternalState(this); | ||
var state = enforceInternalState(this); | ||
if (!state.frozen) state.frozen = new InternalWeakMap(); | ||
@@ -68,0 +68,0 @@ nativeHas(this, key) ? nativeSet(this, key, value) : state.frozen.set(key, value); |
@@ -12,3 +12,3 @@ 'use strict'; | ||
// eslint-disable-next-line no-unused-vars -- required for `.length` | ||
merge: function merge(iterable /* ...iterbles */) { | ||
merge: function merge(iterable /* ...iterables */) { | ||
var map = anObject(this); | ||
@@ -15,0 +15,0 @@ var setter = aCallable(map.set); |
@@ -46,3 +46,3 @@ var IS_PURE = require('../internals/is-pure'); | ||
var push = uncurryThis([].push); | ||
var bolleanValueOf = uncurryThis(true.valueOf); | ||
var booleanValueOf = uncurryThis(true.valueOf); | ||
var numberValueOf = uncurryThis(1.0.valueOf); | ||
@@ -252,3 +252,3 @@ var stringValueOf = uncurryThis(''.valueOf); | ||
case 'Boolean': | ||
cloned = Object(bolleanValueOf(value)); | ||
cloned = Object(booleanValueOf(value)); | ||
break; | ||
@@ -283,3 +283,3 @@ case 'Number': | ||
} catch (error) { | ||
throw new DOMException('ArrayBuffer is deatched', DATA_CLONE_ERROR); | ||
throw new DOMException('ArrayBuffer is detached', DATA_CLONE_ERROR); | ||
} break; | ||
@@ -286,0 +286,0 @@ case 'SharedArrayBuffer': |
{ | ||
"name": "core-js-pure", | ||
"description": "Standard library", | ||
"version": "3.20.0", | ||
"version": "3.20.1", | ||
"repository": { | ||
@@ -57,3 +57,3 @@ "type": "git", | ||
}, | ||
"gitHead": "29590d0f9f1ef51856b8498da76c316712ac7fae" | ||
"gitHead": "8f22e986132c93458b778e656fb501dd6c86764e" | ||
} |
@@ -1,2 +0,2 @@ | ||
![logo](https://user-images.githubusercontent.com/2213682/140570622-ea744c11-632e-4d9a-ba0a-70c390a1fdff.png) | ||
![logo](https://user-images.githubusercontent.com/2213682/146607186-8e13ddef-26a4-4ebf-befd-5aac9d77c090.png) | ||
@@ -27,3 +27,3 @@ [![Open Collective](https://opencollective.com/core-js/all/badge.svg?label=open%20collective)](https://opencollective.com/core-js) [![version](https://img.shields.io/npm/v/core-js.svg)](https://www.npmjs.com/package/core-js) [![core-js downloads](https://img.shields.io/npm/dm/core-js.svg?label=npm%20i%20core-js)](https://npm-stat.com/charts.html?package=core-js&package=core-js-pure&package=core-js-compat&from=2014-11-18) [![core-js-pure downloads](https://img.shields.io/npm/dm/core-js-pure.svg?label=npm%20i%20core-js-pure)](https://npm-stat.com/charts.html?package=core-js&package=core-js-pure&package=core-js-compat&from=2014-11-18) [![tests](https://github.com/zloirock/core-js/workflows/tests/badge.svg)](https://github.com/zloirock/core-js/actions) [![eslint](https://github.com/zloirock/core-js/workflows/eslint/badge.svg)](https://github.com/zloirock/core-js/actions) | ||
```js | ||
import 'core-js'; // <- at the top of your entry point | ||
import 'core-js/actual'; // <- at the top of your entry point | ||
@@ -30,0 +30,0 @@ Array.from(new Set([1, 2, 3, 2, 1])); // => [1, 2, 3] |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
809785
2381
19250