Comparing version
@@ -8,2 +8,3 @@ 'use strict'; | ||
var InternalStateModule = require('../internals/internal-state'); | ||
var iteratorClose = require('../internals/iterator-close'); | ||
var getBuiltIn = require('../internals/get-built-in'); | ||
@@ -19,7 +20,17 @@ var AsyncIteratorPrototype = require('../internals/async-iterator-prototype'); | ||
var asyncFromSyncIteratorContinuation = function (result, resolve, reject) { | ||
var asyncFromSyncIteratorContinuation = function (result, resolve, reject, syncIterator, closeOnRejection) { | ||
var done = result.done; | ||
Promise.resolve(result.value).then(function (value) { | ||
resolve(createIterResultObject(value, done)); | ||
}, reject); | ||
}, function (error) { | ||
if (!done && closeOnRejection) { | ||
try { | ||
iteratorClose(syncIterator, 'throw', error); | ||
} catch (error2) { | ||
error = error2; | ||
} | ||
} | ||
reject(error); | ||
}); | ||
}; | ||
@@ -37,3 +48,3 @@ | ||
var result = anObject(call(state.next, state.iterator)); | ||
asyncFromSyncIteratorContinuation(result, resolve, reject); | ||
asyncFromSyncIteratorContinuation(result, resolve, reject, state.iterator, true); | ||
}); | ||
@@ -47,3 +58,3 @@ }, | ||
var result = anObject(call($return, iterator)); | ||
asyncFromSyncIteratorContinuation(result, resolve, reject); | ||
asyncFromSyncIteratorContinuation(result, resolve, reject, iterator); | ||
}); | ||
@@ -50,0 +61,0 @@ } |
'use strict'; | ||
require('../modules/es.iterator.map'); | ||
var call = require('../internals/function-call'); | ||
var map = require('../internals/iterator-map'); | ||
var map = require('../internals/iterators-core').IteratorPrototype.map; | ||
@@ -5,0 +6,0 @@ var callback = function (value, counter) { |
@@ -37,4 +37,6 @@ 'use strict'; | ||
try { | ||
// late spec change, early WebKit ~ Safari 17.0 beta implementation does not pass it | ||
// late spec change, early WebKit ~ Safari 17 implementation does not pass it | ||
// https://github.com/tc39/proposal-set-methods/pull/88 | ||
// also covered engines with | ||
// https://bugs.webkit.org/show_bug.cgi?id=272679 | ||
new Set()[name](createSetLike(-1)); | ||
@@ -41,0 +43,0 @@ return false; |
@@ -10,7 +10,7 @@ 'use strict'; | ||
(store.versions || (store.versions = [])).push({ | ||
version: '3.41.0', | ||
version: '3.42.0', | ||
mode: IS_PURE ? 'pure' : 'global', | ||
copyright: '© 2014-2025 Denis Pushkarev (zloirock.ru)', | ||
license: 'https://github.com/zloirock/core-js/blob/v3.41.0/LICENSE', | ||
license: 'https://github.com/zloirock/core-js/blob/v3.42.0/LICENSE', | ||
source: 'https://github.com/zloirock/core-js' | ||
}); |
@@ -8,5 +8,9 @@ 'use strict'; | ||
var toPositiveInteger = require('../internals/to-positive-integer'); | ||
var iteratorClose = require('../internals/iterator-close'); | ||
var createIteratorProxy = require('../internals/iterator-create-proxy'); | ||
var iteratorHelperWithoutClosingOnEarlyError = require('../internals/iterator-helper-without-closing-on-early-error'); | ||
var IS_PURE = require('../internals/is-pure'); | ||
var dropWithoutClosingOnEarlyError = !IS_PURE && iteratorHelperWithoutClosingOnEarlyError('drop', RangeError); | ||
var IteratorProxy = createIteratorProxy(function () { | ||
@@ -29,6 +33,14 @@ var iterator = this.iterator; | ||
// https://tc39.es/ecma262/#sec-iterator.prototype.drop | ||
$({ target: 'Iterator', proto: true, real: true, forced: IS_PURE }, { | ||
$({ target: 'Iterator', proto: true, real: true, forced: IS_PURE || dropWithoutClosingOnEarlyError }, { | ||
drop: function drop(limit) { | ||
anObject(this); | ||
var remaining = toPositiveInteger(notANaN(+limit)); | ||
var remaining; | ||
try { | ||
remaining = toPositiveInteger(notANaN(+limit)); | ||
} catch (error) { | ||
iteratorClose(this, 'throw', error); | ||
} | ||
if (dropWithoutClosingOnEarlyError) return call(dropWithoutClosingOnEarlyError, this, remaining); | ||
return new IteratorProxy(getIteratorDirect(this), { | ||
@@ -35,0 +47,0 @@ remaining: remaining |
'use strict'; | ||
var $ = require('../internals/export'); | ||
var call = require('../internals/function-call'); | ||
var iterate = require('../internals/iterate'); | ||
@@ -7,9 +8,20 @@ var aCallable = require('../internals/a-callable'); | ||
var getIteratorDirect = require('../internals/get-iterator-direct'); | ||
var iteratorClose = require('../internals/iterator-close'); | ||
var iteratorHelperWithoutClosingOnEarlyError = require('../internals/iterator-helper-without-closing-on-early-error'); | ||
var everyWithoutClosingOnEarlyError = iteratorHelperWithoutClosingOnEarlyError('every', TypeError); | ||
// `Iterator.prototype.every` method | ||
// https://tc39.es/ecma262/#sec-iterator.prototype.every | ||
$({ target: 'Iterator', proto: true, real: true }, { | ||
$({ target: 'Iterator', proto: true, real: true, forced: everyWithoutClosingOnEarlyError }, { | ||
every: function every(predicate) { | ||
anObject(this); | ||
aCallable(predicate); | ||
try { | ||
aCallable(predicate); | ||
} catch (error) { | ||
iteratorClose(this, 'throw', error); | ||
} | ||
if (everyWithoutClosingOnEarlyError) return call(everyWithoutClosingOnEarlyError, this, predicate); | ||
var record = getIteratorDirect(this); | ||
@@ -16,0 +28,0 @@ var counter = 0; |
@@ -10,3 +10,7 @@ 'use strict'; | ||
var IS_PURE = require('../internals/is-pure'); | ||
var iteratorClose = require('../internals/iterator-close'); | ||
var iteratorHelperWithoutClosingOnEarlyError = require('../internals/iterator-helper-without-closing-on-early-error'); | ||
var filterWithoutClosingOnEarlyError = !IS_PURE && iteratorHelperWithoutClosingOnEarlyError('filter', TypeError); | ||
var IteratorProxy = createIteratorProxy(function () { | ||
@@ -28,6 +32,13 @@ var iterator = this.iterator; | ||
// https://tc39.es/ecma262/#sec-iterator.prototype.filter | ||
$({ target: 'Iterator', proto: true, real: true, forced: IS_PURE }, { | ||
$({ target: 'Iterator', proto: true, real: true, forced: IS_PURE || filterWithoutClosingOnEarlyError }, { | ||
filter: function filter(predicate) { | ||
anObject(this); | ||
aCallable(predicate); | ||
try { | ||
aCallable(predicate); | ||
} catch (error) { | ||
iteratorClose(this, 'throw', error); | ||
} | ||
if (filterWithoutClosingOnEarlyError) return call(filterWithoutClosingOnEarlyError, this, predicate); | ||
return new IteratorProxy(getIteratorDirect(this), { | ||
@@ -34,0 +45,0 @@ predicate: predicate |
'use strict'; | ||
var $ = require('../internals/export'); | ||
var call = require('../internals/function-call'); | ||
var iterate = require('../internals/iterate'); | ||
@@ -7,9 +8,20 @@ var aCallable = require('../internals/a-callable'); | ||
var getIteratorDirect = require('../internals/get-iterator-direct'); | ||
var iteratorClose = require('../internals/iterator-close'); | ||
var iteratorHelperWithoutClosingOnEarlyError = require('../internals/iterator-helper-without-closing-on-early-error'); | ||
var findWithoutClosingOnEarlyError = iteratorHelperWithoutClosingOnEarlyError('find', TypeError); | ||
// `Iterator.prototype.find` method | ||
// https://tc39.es/ecma262/#sec-iterator.prototype.find | ||
$({ target: 'Iterator', proto: true, real: true }, { | ||
$({ target: 'Iterator', proto: true, real: true, forced: findWithoutClosingOnEarlyError }, { | ||
find: function find(predicate) { | ||
anObject(this); | ||
aCallable(predicate); | ||
try { | ||
aCallable(predicate); | ||
} catch (error) { | ||
iteratorClose(this, 'throw', error); | ||
} | ||
if (findWithoutClosingOnEarlyError) return call(findWithoutClosingOnEarlyError, this, predicate); | ||
var record = getIteratorDirect(this); | ||
@@ -16,0 +28,0 @@ var counter = 0; |
@@ -11,3 +11,6 @@ 'use strict'; | ||
var IS_PURE = require('../internals/is-pure'); | ||
var iteratorHelperWithoutClosingOnEarlyError = require('../internals/iterator-helper-without-closing-on-early-error'); | ||
var flatMapWithoutClosingOnEarlyError = !IS_PURE && iteratorHelperWithoutClosingOnEarlyError('flatMap', TypeError); | ||
var IteratorProxy = createIteratorProxy(function () { | ||
@@ -37,6 +40,13 @@ var iterator = this.iterator; | ||
// https://tc39.es/ecma262/#sec-iterator.prototype.flatmap | ||
$({ target: 'Iterator', proto: true, real: true, forced: IS_PURE }, { | ||
$({ target: 'Iterator', proto: true, real: true, forced: IS_PURE || flatMapWithoutClosingOnEarlyError }, { | ||
flatMap: function flatMap(mapper) { | ||
anObject(this); | ||
aCallable(mapper); | ||
try { | ||
aCallable(mapper); | ||
} catch (error) { | ||
iteratorClose(this, 'throw', error); | ||
} | ||
if (flatMapWithoutClosingOnEarlyError) return call(flatMapWithoutClosingOnEarlyError, this, mapper); | ||
return new IteratorProxy(getIteratorDirect(this), { | ||
@@ -43,0 +53,0 @@ mapper: mapper, |
'use strict'; | ||
var $ = require('../internals/export'); | ||
var call = require('../internals/function-call'); | ||
var iterate = require('../internals/iterate'); | ||
@@ -7,9 +8,20 @@ var aCallable = require('../internals/a-callable'); | ||
var getIteratorDirect = require('../internals/get-iterator-direct'); | ||
var iteratorClose = require('../internals/iterator-close'); | ||
var iteratorHelperWithoutClosingOnEarlyError = require('../internals/iterator-helper-without-closing-on-early-error'); | ||
var forEachWithoutClosingOnEarlyError = iteratorHelperWithoutClosingOnEarlyError('forEach', TypeError); | ||
// `Iterator.prototype.forEach` method | ||
// https://tc39.es/ecma262/#sec-iterator.prototype.foreach | ||
$({ target: 'Iterator', proto: true, real: true }, { | ||
$({ target: 'Iterator', proto: true, real: true, forced: forEachWithoutClosingOnEarlyError }, { | ||
forEach: function forEach(fn) { | ||
anObject(this); | ||
aCallable(fn); | ||
try { | ||
aCallable(fn); | ||
} catch (error) { | ||
iteratorClose(this, 'throw', error); | ||
} | ||
if (forEachWithoutClosingOnEarlyError) return call(forEachWithoutClosingOnEarlyError, this, fn); | ||
var record = getIteratorDirect(this); | ||
@@ -16,0 +28,0 @@ var counter = 0; |
'use strict'; | ||
var $ = require('../internals/export'); | ||
var map = require('../internals/iterator-map'); | ||
var call = require('../internals/function-call'); | ||
var aCallable = require('../internals/a-callable'); | ||
var anObject = require('../internals/an-object'); | ||
var getIteratorDirect = require('../internals/get-iterator-direct'); | ||
var createIteratorProxy = require('../internals/iterator-create-proxy'); | ||
var callWithSafeIterationClosing = require('../internals/call-with-safe-iteration-closing'); | ||
var iteratorClose = require('../internals/iterator-close'); | ||
var iteratorHelperWithoutClosingOnEarlyError = require('../internals/iterator-helper-without-closing-on-early-error'); | ||
var IS_PURE = require('../internals/is-pure'); | ||
var mapWithoutClosingOnEarlyError = !IS_PURE && iteratorHelperWithoutClosingOnEarlyError('map', TypeError); | ||
var IteratorProxy = createIteratorProxy(function () { | ||
var iterator = this.iterator; | ||
var result = anObject(call(this.next, iterator)); | ||
var done = this.done = !!result.done; | ||
if (!done) return callWithSafeIterationClosing(iterator, this.mapper, [result.value, this.counter++], true); | ||
}); | ||
// `Iterator.prototype.map` method | ||
// https://tc39.es/ecma262/#sec-iterator.prototype.map | ||
$({ target: 'Iterator', proto: true, real: true, forced: IS_PURE }, { | ||
map: map | ||
$({ target: 'Iterator', proto: true, real: true, forced: IS_PURE || mapWithoutClosingOnEarlyError }, { | ||
map: function map(mapper) { | ||
anObject(this); | ||
try { | ||
aCallable(mapper); | ||
} catch (error) { | ||
iteratorClose(this, 'throw', error); | ||
} | ||
if (mapWithoutClosingOnEarlyError) return call(mapWithoutClosingOnEarlyError, this, mapper); | ||
return new IteratorProxy(getIteratorDirect(this), { | ||
mapper: mapper | ||
}); | ||
} | ||
}); |
@@ -7,14 +7,34 @@ 'use strict'; | ||
var getIteratorDirect = require('../internals/get-iterator-direct'); | ||
var iteratorClose = require('../internals/iterator-close'); | ||
var iteratorHelperWithoutClosingOnEarlyError = require('../internals/iterator-helper-without-closing-on-early-error'); | ||
var apply = require('../internals/function-apply'); | ||
var fails = require('../internals/fails'); | ||
var $TypeError = TypeError; | ||
// https://bugs.webkit.org/show_bug.cgi?id=291651 | ||
var FAILS_ON_INITIAL_UNDEFINED = fails(function () { | ||
// eslint-disable-next-line es/no-iterator-prototype-reduce, es/no-array-prototype-keys, array-callback-return -- required for testing | ||
[].keys().reduce(function () { /* empty */ }, undefined); | ||
}); | ||
var reduceWithoutClosingOnEarlyError = !FAILS_ON_INITIAL_UNDEFINED && iteratorHelperWithoutClosingOnEarlyError('reduce', $TypeError); | ||
// `Iterator.prototype.reduce` method | ||
// https://tc39.es/ecma262/#sec-iterator.prototype.reduce | ||
$({ target: 'Iterator', proto: true, real: true }, { | ||
$({ target: 'Iterator', proto: true, real: true, forced: FAILS_ON_INITIAL_UNDEFINED || reduceWithoutClosingOnEarlyError }, { | ||
reduce: function reduce(reducer /* , initialValue */) { | ||
anObject(this); | ||
aCallable(reducer); | ||
var record = getIteratorDirect(this); | ||
try { | ||
aCallable(reducer); | ||
} catch (error) { | ||
iteratorClose(this, 'throw', error); | ||
} | ||
var noInitial = arguments.length < 2; | ||
var accumulator = noInitial ? undefined : arguments[1]; | ||
if (reduceWithoutClosingOnEarlyError) { | ||
return apply(reduceWithoutClosingOnEarlyError, this, noInitial ? [reducer] : [reducer, accumulator]); | ||
} | ||
var record = getIteratorDirect(this); | ||
var counter = 0; | ||
@@ -21,0 +41,0 @@ iterate(record, function (value) { |
'use strict'; | ||
var $ = require('../internals/export'); | ||
var call = require('../internals/function-call'); | ||
var iterate = require('../internals/iterate'); | ||
@@ -7,9 +8,20 @@ var aCallable = require('../internals/a-callable'); | ||
var getIteratorDirect = require('../internals/get-iterator-direct'); | ||
var iteratorClose = require('../internals/iterator-close'); | ||
var iteratorHelperWithoutClosingOnEarlyError = require('../internals/iterator-helper-without-closing-on-early-error'); | ||
var someWithoutClosingOnEarlyError = iteratorHelperWithoutClosingOnEarlyError('some', TypeError); | ||
// `Iterator.prototype.some` method | ||
// https://tc39.es/ecma262/#sec-iterator.prototype.some | ||
$({ target: 'Iterator', proto: true, real: true }, { | ||
$({ target: 'Iterator', proto: true, real: true, forced: someWithoutClosingOnEarlyError }, { | ||
some: function some(predicate) { | ||
anObject(this); | ||
aCallable(predicate); | ||
try { | ||
aCallable(predicate); | ||
} catch (error) { | ||
iteratorClose(this, 'throw', error); | ||
} | ||
if (someWithoutClosingOnEarlyError) return call(someWithoutClosingOnEarlyError, this, predicate); | ||
var record = getIteratorDirect(this); | ||
@@ -16,0 +28,0 @@ var counter = 0; |
@@ -10,4 +10,7 @@ 'use strict'; | ||
var iteratorClose = require('../internals/iterator-close'); | ||
var iteratorHelperWithoutClosingOnEarlyError = require('../internals/iterator-helper-without-closing-on-early-error'); | ||
var IS_PURE = require('../internals/is-pure'); | ||
var takeWithoutClosingOnEarlyError = !IS_PURE && iteratorHelperWithoutClosingOnEarlyError('take', RangeError); | ||
var IteratorProxy = createIteratorProxy(function () { | ||
@@ -26,6 +29,14 @@ var iterator = this.iterator; | ||
// https://tc39.es/ecma262/#sec-iterator.prototype.take | ||
$({ target: 'Iterator', proto: true, real: true, forced: IS_PURE }, { | ||
$({ target: 'Iterator', proto: true, real: true, forced: IS_PURE || takeWithoutClosingOnEarlyError }, { | ||
take: function take(limit) { | ||
anObject(this); | ||
var remaining = toPositiveInteger(notANaN(+limit)); | ||
var remaining; | ||
try { | ||
remaining = toPositiveInteger(notANaN(+limit)); | ||
} catch (error) { | ||
iteratorClose(this, 'throw', error); | ||
} | ||
if (takeWithoutClosingOnEarlyError) return call(takeWithoutClosingOnEarlyError, this, remaining); | ||
return new IteratorProxy(getIteratorDirect(this), { | ||
@@ -32,0 +43,0 @@ remaining: remaining |
@@ -17,2 +17,3 @@ 'use strict'; | ||
// https://bugs.webkit.org/show_bug.cgi?id=271524 | ||
var DOES_NOT_WORK_WITH_PRIMITIVES = IS_PURE || fails(function () { | ||
@@ -19,0 +20,0 @@ return Map.groupBy('ab', function (it) { |
@@ -16,2 +16,3 @@ 'use strict'; | ||
// https://bugs.webkit.org/show_bug.cgi?id=271524 | ||
var DOES_NOT_WORK_WITH_PRIMITIVES = !nativeGroupBy || fails(function () { | ||
@@ -18,0 +19,0 @@ return nativeGroupBy('ab', function (it) { |
@@ -12,3 +12,3 @@ 'use strict'; | ||
var anObject = require('../internals/an-object'); | ||
var isNullOrUndefined = require('../internals/is-null-or-undefined'); | ||
var isObject = require('../internals/is-object'); | ||
var classof = require('../internals/classof-raw'); | ||
@@ -87,3 +87,3 @@ var isRegExp = require('../internals/is-regexp'); | ||
var flags, S, matcher, rx; | ||
if (!isNullOrUndefined(regexp)) { | ||
if (isObject(regexp)) { | ||
if (isRegExp(regexp)) { | ||
@@ -90,0 +90,0 @@ flags = toString(requireObjectCoercible(getRegExpFlags(regexp))); |
@@ -5,3 +5,3 @@ 'use strict'; | ||
var anObject = require('../internals/an-object'); | ||
var isNullOrUndefined = require('../internals/is-null-or-undefined'); | ||
var isObject = require('../internals/is-object'); | ||
var toLength = require('../internals/to-length'); | ||
@@ -21,3 +21,3 @@ var toString = require('../internals/to-string'); | ||
var O = requireObjectCoercible(this); | ||
var matcher = isNullOrUndefined(regexp) ? undefined : getMethod(regexp, MATCH); | ||
var matcher = isObject(regexp) ? getMethod(regexp, MATCH) : undefined; | ||
return matcher ? call(matcher, regexp, O) : new RegExp(regexp)[MATCH](toString(O)); | ||
@@ -24,0 +24,0 @@ }, |
@@ -7,3 +7,3 @@ 'use strict'; | ||
var isCallable = require('../internals/is-callable'); | ||
var isNullOrUndefined = require('../internals/is-null-or-undefined'); | ||
var isObject = require('../internals/is-object'); | ||
var isRegExp = require('../internals/is-regexp'); | ||
@@ -32,3 +32,3 @@ var toString = require('../internals/to-string'); | ||
var result = ''; | ||
if (!isNullOrUndefined(searchValue)) { | ||
if (isObject(searchValue)) { | ||
IS_REG_EXP = isRegExp(searchValue); | ||
@@ -35,0 +35,0 @@ if (IS_REG_EXP) { |
@@ -9,3 +9,3 @@ 'use strict'; | ||
var isCallable = require('../internals/is-callable'); | ||
var isNullOrUndefined = require('../internals/is-null-or-undefined'); | ||
var isObject = require('../internals/is-object'); | ||
var toIntegerOrInfinity = require('../internals/to-integer-or-infinity'); | ||
@@ -68,3 +68,3 @@ var toLength = require('../internals/to-length'); | ||
var O = requireObjectCoercible(this); | ||
var replacer = isNullOrUndefined(searchValue) ? undefined : getMethod(searchValue, REPLACE); | ||
var replacer = isObject(searchValue) ? getMethod(searchValue, REPLACE) : undefined; | ||
return replacer | ||
@@ -71,0 +71,0 @@ ? call(replacer, searchValue, O, replaceValue) |
@@ -5,3 +5,3 @@ 'use strict'; | ||
var anObject = require('../internals/an-object'); | ||
var isNullOrUndefined = require('../internals/is-null-or-undefined'); | ||
var isObject = require('../internals/is-object'); | ||
var requireObjectCoercible = require('../internals/require-object-coercible'); | ||
@@ -20,3 +20,3 @@ var sameValue = require('../internals/same-value'); | ||
var O = requireObjectCoercible(this); | ||
var searcher = isNullOrUndefined(regexp) ? undefined : getMethod(regexp, SEARCH); | ||
var searcher = isObject(regexp) ? getMethod(regexp, SEARCH) : undefined; | ||
return searcher ? call(searcher, regexp, O) : new RegExp(regexp)[SEARCH](toString(O)); | ||
@@ -23,0 +23,0 @@ }, |
@@ -6,3 +6,3 @@ 'use strict'; | ||
var anObject = require('../internals/an-object'); | ||
var isNullOrUndefined = require('../internals/is-null-or-undefined'); | ||
var isObject = require('../internals/is-object'); | ||
var requireObjectCoercible = require('../internals/require-object-coercible'); | ||
@@ -55,3 +55,3 @@ var speciesConstructor = require('../internals/species-constructor'); | ||
var O = requireObjectCoercible(this); | ||
var splitter = isNullOrUndefined(separator) ? undefined : getMethod(separator, SPLIT); | ||
var splitter = isObject(separator) ? getMethod(separator, SPLIT) : undefined; | ||
return splitter | ||
@@ -58,0 +58,0 @@ ? call(splitter, separator, O, limit) |
@@ -10,3 +10,2 @@ 'use strict'; | ||
var createIterResultObject = require('../internals/create-iter-result-object'); | ||
var IS_PURE = require('../internals/is-pure'); | ||
@@ -44,3 +43,3 @@ var AsyncIteratorProxy = createAsyncIteratorProxy(function (Promise) { | ||
// https://github.com/tc39/proposal-async-iterator-helpers | ||
$({ target: 'AsyncIterator', proto: true, real: true, forced: IS_PURE }, { | ||
$({ target: 'AsyncIterator', proto: true, real: true, forced: true }, { | ||
drop: function drop(limit) { | ||
@@ -47,0 +46,0 @@ anObject(this); |
@@ -7,3 +7,3 @@ 'use strict'; | ||
// https://github.com/tc39/proposal-async-iterator-helpers | ||
$({ target: 'AsyncIterator', proto: true, real: true }, { | ||
$({ target: 'AsyncIterator', proto: true, real: true, forced: true }, { | ||
every: function every(predicate) { | ||
@@ -10,0 +10,0 @@ return $every(this, predicate); |
@@ -11,3 +11,2 @@ 'use strict'; | ||
var closeAsyncIteration = require('../internals/async-iterator-close'); | ||
var IS_PURE = require('../internals/is-pure'); | ||
@@ -60,3 +59,3 @@ var AsyncIteratorProxy = createAsyncIteratorProxy(function (Promise) { | ||
// https://github.com/tc39/proposal-async-iterator-helpers | ||
$({ target: 'AsyncIterator', proto: true, real: true, forced: IS_PURE }, { | ||
$({ target: 'AsyncIterator', proto: true, real: true, forced: true }, { | ||
filter: function filter(predicate) { | ||
@@ -63,0 +62,0 @@ anObject(this); |
@@ -7,3 +7,3 @@ 'use strict'; | ||
// https://github.com/tc39/proposal-async-iterator-helpers | ||
$({ target: 'AsyncIterator', proto: true, real: true }, { | ||
$({ target: 'AsyncIterator', proto: true, real: true, forced: true }, { | ||
find: function find(predicate) { | ||
@@ -10,0 +10,0 @@ return $find(this, predicate); |
@@ -12,3 +12,2 @@ 'use strict'; | ||
var closeAsyncIteration = require('../internals/async-iterator-close'); | ||
var IS_PURE = require('../internals/is-pure'); | ||
@@ -80,3 +79,3 @@ var AsyncIteratorProxy = createAsyncIteratorProxy(function (Promise) { | ||
// https://github.com/tc39/proposal-async-iterator-helpers | ||
$({ target: 'AsyncIterator', proto: true, real: true, forced: IS_PURE }, { | ||
$({ target: 'AsyncIterator', proto: true, real: true, forced: true }, { | ||
flatMap: function flatMap(mapper) { | ||
@@ -83,0 +82,0 @@ anObject(this); |
@@ -7,3 +7,3 @@ 'use strict'; | ||
// https://github.com/tc39/proposal-async-iterator-helpers | ||
$({ target: 'AsyncIterator', proto: true, real: true }, { | ||
$({ target: 'AsyncIterator', proto: true, real: true, forced: true }, { | ||
forEach: function forEach(fn) { | ||
@@ -10,0 +10,0 @@ return $forEach(this, fn); |
@@ -8,7 +8,6 @@ 'use strict'; | ||
var WrapAsyncIterator = require('../internals/async-iterator-wrap'); | ||
var IS_PURE = require('../internals/is-pure'); | ||
// `AsyncIterator.from` method | ||
// https://github.com/tc39/proposal-async-iterator-helpers | ||
$({ target: 'AsyncIterator', stat: true, forced: IS_PURE }, { | ||
$({ target: 'AsyncIterator', stat: true, forced: true }, { | ||
from: function from(O) { | ||
@@ -15,0 +14,0 @@ var iteratorRecord = getAsyncIteratorFlattenable(typeof O == 'string' ? toObject(O) : O); |
'use strict'; | ||
var $ = require('../internals/export'); | ||
var map = require('../internals/async-iterator-map'); | ||
var IS_PURE = require('../internals/is-pure'); | ||
// `AsyncIterator.prototype.map` method | ||
// https://github.com/tc39/proposal-async-iterator-helpers | ||
$({ target: 'AsyncIterator', proto: true, real: true, forced: IS_PURE }, { | ||
$({ target: 'AsyncIterator', proto: true, real: true, forced: true }, { | ||
map: map | ||
}); | ||
@@ -16,3 +16,3 @@ 'use strict'; | ||
// https://github.com/tc39/proposal-async-iterator-helpers | ||
$({ target: 'AsyncIterator', proto: true, real: true }, { | ||
$({ target: 'AsyncIterator', proto: true, real: true, forced: true }, { | ||
reduce: function reduce(reducer /* , initialValue */) { | ||
@@ -19,0 +19,0 @@ anObject(this); |
@@ -7,3 +7,3 @@ 'use strict'; | ||
// https://github.com/tc39/proposal-async-iterator-helpers | ||
$({ target: 'AsyncIterator', proto: true, real: true }, { | ||
$({ target: 'AsyncIterator', proto: true, real: true, forced: true }, { | ||
some: function some(predicate) { | ||
@@ -10,0 +10,0 @@ return $some(this, predicate); |
@@ -10,3 +10,2 @@ 'use strict'; | ||
var createIterResultObject = require('../internals/create-iter-result-object'); | ||
var IS_PURE = require('../internals/is-pure'); | ||
@@ -41,3 +40,3 @@ var AsyncIteratorProxy = createAsyncIteratorProxy(function (Promise) { | ||
// https://github.com/tc39/proposal-async-iterator-helpers | ||
$({ target: 'AsyncIterator', proto: true, real: true, forced: IS_PURE }, { | ||
$({ target: 'AsyncIterator', proto: true, real: true, forced: true }, { | ||
take: function take(limit) { | ||
@@ -44,0 +43,0 @@ anObject(this); |
@@ -7,3 +7,3 @@ 'use strict'; | ||
// https://github.com/tc39/proposal-async-iterator-helpers | ||
$({ target: 'AsyncIterator', proto: true, real: true }, { | ||
$({ target: 'AsyncIterator', proto: true, real: true, forced: true }, { | ||
toArray: function toArray() { | ||
@@ -10,0 +10,0 @@ return $toArray(this, undefined, []); |
@@ -7,7 +7,6 @@ 'use strict'; | ||
var getIteratorDirect = require('../internals/get-iterator-direct'); | ||
var IS_PURE = require('../internals/is-pure'); | ||
// `Iterator.prototype.toAsync` method | ||
// https://github.com/tc39/proposal-async-iterator-helpers | ||
$({ target: 'Iterator', proto: true, real: true, forced: IS_PURE }, { | ||
$({ target: 'Iterator', proto: true, real: true, forced: true }, { | ||
toAsync: function toAsync() { | ||
@@ -14,0 +13,0 @@ return new WrapAsyncIterator(getIteratorDirect(new AsyncFromSyncIterator(getIteratorDirect(anObject(this))))); |
@@ -6,3 +6,3 @@ 'use strict'; | ||
// `JSON.parse` method | ||
// `JSON.isRawJSON` method | ||
// https://tc39.es/proposal-json-parse-with-source/#sec-json.israwjson | ||
@@ -9,0 +9,0 @@ // https://github.com/tc39/proposal-json-parse-with-source |
@@ -35,4 +35,4 @@ 'use strict'; | ||
// `JSON.parse` method | ||
// https://tc39.es/proposal-json-parse-with-source/#sec-json.israwjson | ||
// `JSON.rawJSON` method | ||
// https://tc39.es/proposal-json-parse-with-source/#sec-json.rawjson | ||
// https://github.com/tc39/proposal-json-parse-with-source | ||
@@ -39,0 +39,0 @@ $({ target: 'JSON', stat: true, forced: !NATIVE_RAW_JSON }, { |
@@ -9,5 +9,14 @@ 'use strict'; | ||
var INCORRECT_BEHAVIOR_OR_DOESNT_EXISTS = !Uint8Array || !Uint8Array.prototype.setFromBase64 || !(function () { | ||
var target = new Uint8Array([255, 255, 255, 255, 255]); | ||
try { | ||
target.setFromBase64('MjYyZg==='); | ||
} catch (error) { | ||
return target[0] === 50 && target[1] === 54 && target[2] === 50 && target[3] === 255 && target[4] === 255; | ||
} | ||
})(); | ||
// `Uint8Array.prototype.setFromBase64` method | ||
// https://github.com/tc39/proposal-arraybuffer-base64 | ||
if (Uint8Array) $({ target: 'Uint8Array', proto: true }, { | ||
if (Uint8Array) $({ target: 'Uint8Array', proto: true, forced: INCORRECT_BEHAVIOR_OR_DOESNT_EXISTS }, { | ||
setFromBase64: function setFromBase64(string /* , options */) { | ||
@@ -14,0 +23,0 @@ anUint8Array(this); |
@@ -5,2 +5,3 @@ 'use strict'; | ||
var aWeakMap = require('../internals/a-weak-map'); | ||
var aWeakKey = require('../internals/a-weak-key'); | ||
var WeakMapHelpers = require('../internals/weak-map-helpers'); | ||
@@ -17,5 +18,5 @@ | ||
aWeakMap(this); | ||
aWeakKey(key); | ||
aCallable(callbackfn); | ||
if (has(this, key)) return get(this, key); | ||
set(this, key); // key validation | ||
var value = callbackfn(key); | ||
@@ -22,0 +23,0 @@ set(this, key, value); |
{ | ||
"name": "core-js", | ||
"version": "3.41.0", | ||
"version": "3.42.0", | ||
"type": "commonjs", | ||
@@ -5,0 +5,0 @@ "description": "Standard library", |
@@ -5,3 +5,4 @@ 'use strict'; | ||
require('../proposals/iterator-sequencing'); | ||
require('../proposals/map-upsert-v4'); | ||
module.exports = parent; |
@@ -8,3 +8,2 @@ 'use strict'; | ||
require('../proposals/iterator-range'); | ||
require('../proposals/map-upsert-v4'); | ||
require('../proposals/string-dedent'); | ||
@@ -11,0 +10,0 @@ require('../proposals/symbol-predicates-v2'); |
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
1272681
0.56%3578
0.03%31591
0.43%