es-iterator-helpers
Advanced tools
Comparing version 1.0.15 to 1.0.16
'use strict'; | ||
var GetIntrinsic = require('get-intrinsic'); | ||
var $TypeError = require('es-errors/type'); | ||
var $TypeError = GetIntrinsic('%TypeError%'); | ||
var GeneratorStart = require('./GeneratorStart'); | ||
@@ -11,3 +9,2 @@ var IsArray = require('es-abstract/2023/IsArray'); | ||
var OrdinaryObjectCreate = require('es-abstract/2023/OrdinaryObjectCreate'); | ||
var Type = require('es-abstract/2023/Type'); | ||
@@ -21,3 +18,3 @@ var every = require('es-abstract/helpers/every'); | ||
var isString = function isString(slot) { | ||
return Type(slot) === 'String'; | ||
return typeof slot === 'string'; | ||
}; | ||
@@ -29,3 +26,3 @@ | ||
} | ||
if (Type(generatorBrand) !== 'String') { | ||
if (typeof generatorBrand !== 'string') { | ||
throw new $TypeError('`generatorBrand` must be a string'); | ||
@@ -32,0 +29,0 @@ } |
'use strict'; | ||
var GetIntrinsic = require('get-intrinsic'); | ||
var $TypeError = require('es-errors/type'); | ||
var $TypeError = GetIntrinsic('%TypeError%'); | ||
var CreateIterResultObject = require('es-abstract/2023/CreateIterResultObject'); | ||
@@ -8,0 +6,0 @@ var GeneratorValidate = require('./GeneratorValidate'); |
'use strict'; | ||
var GetIntrinsic = require('get-intrinsic'); | ||
var $TypeError = require('es-errors/type'); | ||
var $TypeError = GetIntrinsic('%TypeError%'); | ||
var CompletionRecord = require('es-abstract/2023/CompletionRecord'); | ||
@@ -8,0 +6,0 @@ var CreateIterResultObject = require('es-abstract/2023/CreateIterResultObject'); |
'use strict'; | ||
var GetIntrinsic = require('get-intrinsic'); | ||
var $TypeError = require('es-errors/type'); | ||
var $TypeError = GetIntrinsic('%TypeError%'); | ||
var CreateIterResultObject = require('es-abstract/2023/CreateIterResultObject'); | ||
@@ -8,0 +6,0 @@ var IsCallable = require('es-abstract/2023/IsCallable'); |
'use strict'; | ||
var GetIntrinsic = require('get-intrinsic'); | ||
var $TypeError = require('es-errors/type'); | ||
var $TypeError = GetIntrinsic('%TypeError%'); | ||
var SLOT = require('internal-slot'); | ||
@@ -8,0 +6,0 @@ |
'use strict'; | ||
var GetIntrinsic = require('get-intrinsic'); | ||
var $TypeError = require('es-errors/type'); | ||
var $TypeError = GetIntrinsic('%TypeError%'); | ||
var Get = require('es-abstract/2023/Get'); | ||
@@ -8,0 +6,0 @@ var Type = require('es-abstract/2023/Type'); |
'use strict'; | ||
var GetIntrinsic = require('get-intrinsic'); | ||
var $TypeError = require('es-errors/type'); | ||
var $TypeError = GetIntrinsic('%TypeError%'); | ||
var AdvanceStringIndex = require('es-abstract/2023/AdvanceStringIndex'); | ||
@@ -8,0 +6,0 @@ var Call = require('es-abstract/2023/Call'); |
'use strict'; | ||
var GetIntrinsic = require('get-intrinsic'); | ||
var $TypeError = require('es-errors/type'); | ||
var $TypeError = GetIntrinsic('%TypeError%'); | ||
var Call = require('es-abstract/2023/Call'); | ||
@@ -8,0 +6,0 @@ var CompletionRecord = require('es-abstract/2023/CompletionRecord'); |
@@ -8,2 +8,15 @@ # Changelog | ||
## [v1.0.16](https://github.com/es-shims/iterator-helpers/compare/v1.0.15...v1.0.16) - 2024-02-09 | ||
### Commits | ||
- [Refactor] use `IteratorStepValue` [`aa62d72`](https://github.com/es-shims/iterator-helpers/commit/aa62d72c52d86218942b4792c7131f72d939b733) | ||
- [Refactor] use `es-errors` instead of `get-intrinsic` where possible [`05a25ae`](https://github.com/es-shims/iterator-helpers/commit/05a25aeccd0523df86b401c771d88fbea06558c9) | ||
- [Deps] update `call-bind`, `es-abstract`, `es-set-tostringtag`, `function-bind`, `get-intrinsic`, `has-property-descriptors`, `internal-slot`, `safe-array-concat` [`6aeee43`](https://github.com/es-shims/iterator-helpers/commit/6aeee435ed5956b7c5ee66a51b86c26827874eae) | ||
- [Dev Deps] update `aud`, `eslint-plugin-import`, `mock-property`, `npmignore`, `object-inspect`, `tape` [`0a21fdb`](https://github.com/es-shims/iterator-helpers/commit/0a21fdb4a59d25c248561b7f476fc9670b411855) | ||
- [Deps] update `call-bind`, `es-errors`, `get-intrinsic`, `internal-slot` [`5b10625`](https://github.com/es-shims/iterator-helpers/commit/5b106251dad4252a744b2e0aa0d1be4c1c62b779) | ||
- [meta] add missing `engines.node` [`1534039`](https://github.com/es-shims/iterator-helpers/commit/1534039eca062429c0df68dcc3459ce9ba7c69be) | ||
- [Deps] update `get-intrinsic` [`37da5f2`](https://github.com/es-shims/iterator-helpers/commit/37da5f201940c78526de647ef9ba84d9152349c1) | ||
- [Dev Deps] update `has-tostringtag` [`a7cac51`](https://github.com/es-shims/iterator-helpers/commit/a7cac51cc027e6274918cb1ea0cf1fa1a194fcd9) | ||
## [v1.0.15](https://github.com/es-shims/iterator-helpers/compare/v1.0.14...v1.0.15) - 2023-09-13 | ||
@@ -10,0 +23,0 @@ |
'use strict'; | ||
var GetIntrinsic = require('get-intrinsic'); | ||
var $TypeError = require('es-errors/type'); | ||
var $TypeError = GetIntrinsic('%TypeError%'); | ||
var GetIteratorFlattenable = require('../aos/GetIteratorFlattenable'); | ||
@@ -8,0 +6,0 @@ var OrdinaryHasInstance = require('es-abstract/2023/OrdinaryHasInstance'); |
'use strict'; | ||
var GetIntrinsic = require('get-intrinsic'); | ||
var $RangeError = require('es-errors/range'); | ||
var $TypeError = require('es-errors/type'); | ||
var $RangeError = GetIntrinsic('%RangeError%'); | ||
var $TypeError = GetIntrinsic('%TypeError%'); | ||
var CompletionRecord = require('es-abstract/2023/CompletionRecord'); | ||
@@ -13,3 +11,3 @@ var CreateIteratorFromClosure = require('../aos/CreateIteratorFromClosure'); | ||
var IteratorStep = require('es-abstract/2023/IteratorStep'); | ||
var IteratorValue = require('es-abstract/2023/IteratorValue'); | ||
var IteratorStepValue = require('../aos/IteratorStepValue'); | ||
var ThrowCompletion = require('es-abstract/2023/ThrowCompletion'); | ||
@@ -74,10 +72,8 @@ var ToIntegerOrInfinity = require('es-abstract/2023/ToIntegerOrInfinity'); | ||
// while (true) { // step 6.c | ||
next = IteratorStep(iterated); // step 6.c.i | ||
if (!next) { | ||
// return void undefined; // step 6.c.ii | ||
return sentinel; | ||
} | ||
try { | ||
var value = IteratorValue(next); // step 6.c.iii | ||
return value; // step 6.c.iii | ||
var value = IteratorStepValue(iterated); // step 6.b.i | ||
if (iterated['[[Done]]']) { | ||
return sentinel; // step 6.b.ii | ||
} | ||
return value; | ||
} catch (e) { | ||
@@ -84,0 +80,0 @@ // close iterator // step 6.c.icv |
'use strict'; | ||
var GetIntrinsic = require('get-intrinsic'); | ||
var $TypeError = require('es-errors/type'); | ||
var $TypeError = GetIntrinsic('%TypeError%'); | ||
var Call = require('es-abstract/2023/Call'); | ||
@@ -11,4 +9,3 @@ var GetIteratorDirect = require('../aos/GetIteratorDirect'); | ||
var IteratorClose = require('../aos/IteratorClose'); | ||
var IteratorStep = require('es-abstract/2023/IteratorStep'); | ||
var IteratorValue = require('es-abstract/2023/IteratorValue'); | ||
var IteratorStepValue = require('../aos/IteratorStepValue'); | ||
var NormalCompletion = require('es-abstract/2023/NormalCompletion'); | ||
@@ -39,12 +36,11 @@ var ThrowCompletion = require('es-abstract/2023/ThrowCompletion'); | ||
while (true) { // step 6 | ||
var next = IteratorStep(iterated); // step 6.a | ||
if (!next) { | ||
var value = IteratorStepValue(iterated); // step 6.a | ||
if (iterated['[[Done]]']) { | ||
return true; // step 6.b | ||
} | ||
var value = IteratorValue(next); // step 6.c | ||
var result; | ||
try { | ||
result = Call(predicate, void undefined, [value, counter]); // step 6.d | ||
result = Call(predicate, void undefined, [value, counter]); // step 6.c | ||
} catch (e) { | ||
// close iterator // step 6.e | ||
// close iterator // step 6.d | ||
IteratorClose( | ||
@@ -55,3 +51,3 @@ iterated, | ||
} finally { | ||
counter += 1; // step 6.g | ||
counter += 1; // step 6.f | ||
} | ||
@@ -62,5 +58,5 @@ if (!ToBoolean(result)) { | ||
NormalCompletion(false) | ||
); // step 6.f | ||
); // step 6.e | ||
} | ||
} | ||
}; |
'use strict'; | ||
var GetIntrinsic = require('get-intrinsic'); | ||
var $TypeError = require('es-errors/type'); | ||
var $TypeError = GetIntrinsic('%TypeError%'); | ||
var Call = require('es-abstract/2023/Call'); | ||
@@ -13,4 +11,3 @@ var CompletionRecord = require('es-abstract/2023/CompletionRecord'); | ||
var IteratorClose = require('../aos/IteratorClose'); | ||
var IteratorStep = require('es-abstract/2023/IteratorStep'); | ||
var IteratorValue = require('es-abstract/2023/IteratorValue'); | ||
var IteratorStepValue = require('../aos/IteratorStepValue'); | ||
var ThrowCompletion = require('es-abstract/2023/ThrowCompletion'); | ||
@@ -55,8 +52,7 @@ var ToBoolean = require('es-abstract/2023/ToBoolean'); | ||
while (true) { // step 6.b | ||
var next = IteratorStep(iterated); // step 6.b.i | ||
if (!next) { | ||
// return void undefined; // step 6.b.ii | ||
return sentinel; | ||
var value = IteratorStepValue(iterated); // step 6.b.i | ||
if (iterated['[[Done]]']) { | ||
return sentinel; // step 6.b.ii | ||
} | ||
var value = IteratorValue(next); // step 6.b.iii | ||
var selected; | ||
@@ -63,0 +59,0 @@ try { |
'use strict'; | ||
var GetIntrinsic = require('get-intrinsic'); | ||
var $TypeError = require('es-errors/type'); | ||
var $TypeError = GetIntrinsic('%TypeError%'); | ||
var Call = require('es-abstract/2023/Call'); | ||
@@ -11,4 +9,3 @@ var GetIteratorDirect = require('../aos/GetIteratorDirect'); | ||
var IteratorClose = require('../aos/IteratorClose'); | ||
var IteratorStep = require('es-abstract/2023/IteratorStep'); | ||
var IteratorValue = require('es-abstract/2023/IteratorValue'); | ||
var IteratorStepValue = require('../aos/IteratorStepValue'); | ||
var NormalCompletion = require('es-abstract/2023/NormalCompletion'); | ||
@@ -40,12 +37,11 @@ var ThrowCompletion = require('es-abstract/2023/ThrowCompletion'); | ||
while (true) { // step 6 | ||
var next = IteratorStep(iterated); // step 6.a | ||
if (!next) { | ||
var value = IteratorStepValue(iterated); // step 6.a | ||
if (iterated['[[Done]]']) { | ||
return void undefined; // step 6.b | ||
} | ||
var value = IteratorValue(next); // step 6.c | ||
var result; | ||
try { | ||
result = Call(predicate, void undefined, [value, counter]); // step 6.d | ||
result = Call(predicate, void undefined, [value, counter]); // step 6.c | ||
} catch (e) { | ||
// close iterator // step 6.e | ||
// close iterator // step 6.d | ||
IteratorClose( | ||
@@ -56,3 +52,3 @@ iterated, | ||
} finally { | ||
counter += 1; // step 6.g | ||
counter += 1; // step 6.f | ||
} | ||
@@ -63,5 +59,5 @@ if (ToBoolean(result)) { | ||
NormalCompletion(value) | ||
); // step 6.f | ||
); // step 6.e | ||
} | ||
} | ||
}; |
'use strict'; | ||
var GetIntrinsic = require('get-intrinsic'); | ||
var $TypeError = require('es-errors/type'); | ||
var $TypeError = GetIntrinsic('%TypeError%'); | ||
var Call = require('es-abstract/2023/Call'); | ||
@@ -14,4 +12,3 @@ var CompletionRecord = require('es-abstract/2023/CompletionRecord'); | ||
var IteratorClose = require('../aos/IteratorClose'); | ||
var IteratorStep = require('es-abstract/2023/IteratorStep'); | ||
var IteratorValue = require('es-abstract/2023/IteratorValue'); | ||
var IteratorStepValue = require('../aos/IteratorStepValue'); | ||
var ThrowCompletion = require('es-abstract/2023/ThrowCompletion'); | ||
@@ -69,4 +66,4 @@ var Type = require('es-abstract/2023/Type'); | ||
if (innerIterator === sentinel) { | ||
var next = IteratorStep(iterated); // step 5.b.i | ||
if (!next) { | ||
var value = IteratorStepValue(iterated); // step 5.b.i | ||
if (iterated['[[Done]]']) { | ||
innerAlive = false; | ||
@@ -77,3 +74,2 @@ innerIterator = sentinel; | ||
} | ||
var value = IteratorValue(next); // step 5.b.iii | ||
} | ||
@@ -97,18 +93,6 @@ | ||
if (innerAlive) { | ||
var innerNext; | ||
try { | ||
innerNext = IteratorStep(innerIterator); // step 5.b.ix.1 | ||
} catch (e) { | ||
innerIterator = sentinel; | ||
closeIfAbrupt(ThrowCompletion(e)); // step 5.b.ix.2 | ||
} | ||
if (!innerNext) { | ||
innerAlive = false; // step 5.b.ix.3.a | ||
innerIterator = sentinel; | ||
return closure(); | ||
} | ||
// step 5.b.ix.4 | ||
var innerValue; | ||
try { | ||
innerValue = IteratorValue(innerNext); // step 5.b.ix.4.a | ||
innerValue = IteratorStepValue(innerIterator); // step 5.b.ix.4.a | ||
} catch (e) { | ||
@@ -119,2 +103,7 @@ innerAlive = false; | ||
} | ||
if (innerIterator['[[Done]]']) { | ||
innerAlive = false; | ||
innerIterator = sentinel; | ||
return closure(); | ||
} | ||
return innerValue; // step 5.b.ix.4.c | ||
@@ -121,0 +110,0 @@ } |
'use strict'; | ||
var GetIntrinsic = require('get-intrinsic'); | ||
var $TypeError = require('es-errors/type'); | ||
var $TypeError = GetIntrinsic('%TypeError%'); | ||
var Call = require('es-abstract/2023/Call'); | ||
@@ -11,4 +9,3 @@ var GetIteratorDirect = require('../aos/GetIteratorDirect'); | ||
var IteratorClose = require('../aos/IteratorClose'); | ||
var IteratorStep = require('es-abstract/2023/IteratorStep'); | ||
var IteratorValue = require('es-abstract/2023/IteratorValue'); | ||
var IteratorStepValue = require('../aos/IteratorStepValue'); | ||
var ThrowCompletion = require('es-abstract/2023/ThrowCompletion'); | ||
@@ -37,9 +34,8 @@ var Type = require('es-abstract/2023/Type'); | ||
while (true) { // step 6 | ||
var next = IteratorStep(iterated); // step 6.a | ||
if (!next) { | ||
var value = IteratorStepValue(iterated); // step 6.a | ||
if (iterated['[[Done]]']) { | ||
return void undefined; // step 6.b | ||
} | ||
var value = IteratorValue(next); // step 6.c | ||
try { | ||
Call(fn, void undefined, [value, counter]); // step 6.d | ||
Call(fn, void undefined, [value, counter]); // step 6.c | ||
} catch (e) { | ||
@@ -49,8 +45,8 @@ IteratorClose( | ||
ThrowCompletion(e) | ||
); // steps 6.e | ||
); // steps 6.d | ||
throw e; | ||
} finally { | ||
counter += 1; // step 6.f | ||
counter += 1; // step 6.e | ||
} | ||
} | ||
}; |
'use strict'; | ||
var GetIntrinsic = require('get-intrinsic'); | ||
var $TypeError = require('es-errors/type'); | ||
var $TypeError = GetIntrinsic('%TypeError%'); | ||
var Call = require('es-abstract/2023/Call'); | ||
@@ -13,4 +11,3 @@ var CompletionRecord = require('es-abstract/2023/CompletionRecord'); | ||
var IteratorClose = require('../aos/IteratorClose'); | ||
var IteratorStep = require('es-abstract/2023/IteratorStep'); | ||
var IteratorValue = require('es-abstract/2023/IteratorValue'); | ||
var IteratorStepValue = require('../aos/IteratorStepValue'); | ||
var ThrowCompletion = require('es-abstract/2023/ThrowCompletion'); | ||
@@ -53,12 +50,10 @@ var Type = require('es-abstract/2023/Type'); | ||
// while (true) { // step 6.b | ||
var next = IteratorStep(iterated); // step 6.b.i | ||
var value = IteratorStepValue(iterated); // step 6.b.i | ||
if (iterated['[[Done]]']) { | ||
return sentinel; // step 6.b.ii | ||
} | ||
if (!next) { | ||
// return void undefined; // step 6.b.ii | ||
return sentinel; | ||
} | ||
var value = IteratorValue(next); // step 6.b.iii | ||
var mapped; | ||
try { | ||
mapped = Call(mapper, void undefined, [value, counter]); // step 6.b.iv | ||
mapped = Call(mapper, void undefined, [value, counter]); // step 6.b.iii | ||
// yield mapped // step 6.b.vi | ||
@@ -65,0 +60,0 @@ return mapped; |
'use strict'; | ||
var GetIntrinsic = require('get-intrinsic'); | ||
var $TypeError = require('es-errors/type'); | ||
var $TypeError = GetIntrinsic('%TypeError%'); | ||
var Call = require('es-abstract/2023/Call'); | ||
@@ -11,4 +9,3 @@ var GetIteratorDirect = require('../aos/GetIteratorDirect'); | ||
var IteratorClose = require('../aos/IteratorClose'); | ||
var IteratorStep = require('es-abstract/2023/IteratorStep'); | ||
var IteratorValue = require('es-abstract/2023/IteratorValue'); | ||
var IteratorStepValue = require('../aos/IteratorStepValue'); | ||
var ThrowCompletion = require('es-abstract/2023/ThrowCompletion'); | ||
@@ -35,9 +32,7 @@ var Type = require('es-abstract/2023/Type'); | ||
var counter; | ||
var next; | ||
if (arguments.length < 2) { // step 6 | ||
next = IteratorStep(iterated); // step 6.a | ||
if (!next) { | ||
throw new $TypeError('Reduce of empty iterator with no initial value'); // step 6.b | ||
accumulator = IteratorStepValue(iterated); // step 6.a | ||
if (iterated['[[Done]]']) { | ||
throw new $TypeError('Reduce of empty iterator with no initial value'); | ||
} | ||
accumulator = IteratorValue(next); // step 6.c | ||
counter = 1; | ||
@@ -51,7 +46,6 @@ } else { // step 7 | ||
while (true) { // step 8 | ||
next = IteratorStep(iterated); // step 8.a | ||
if (!next) { | ||
var value = IteratorStepValue(iterated); // step 8.a | ||
if (iterated['[[Done]]']) { | ||
return accumulator; // step 8.b | ||
} | ||
var value = IteratorValue(next); // step 8.c | ||
try { | ||
@@ -58,0 +52,0 @@ var result = Call(reducer, void undefined, [accumulator, value, counter]); // step 8.d |
'use strict'; | ||
var GetIntrinsic = require('get-intrinsic'); | ||
var $TypeError = require('es-errors/type'); | ||
var $TypeError = GetIntrinsic('%TypeError%'); | ||
var Call = require('es-abstract/2023/Call'); | ||
@@ -11,4 +9,3 @@ var GetIteratorDirect = require('../aos/GetIteratorDirect'); | ||
var IteratorClose = require('../aos/IteratorClose'); | ||
var IteratorStep = require('es-abstract/2023/IteratorStep'); | ||
var IteratorValue = require('es-abstract/2023/IteratorValue'); | ||
var IteratorStepValue = require('../aos/IteratorStepValue'); | ||
var NormalCompletion = require('es-abstract/2023/NormalCompletion'); | ||
@@ -39,12 +36,11 @@ var ThrowCompletion = require('es-abstract/2023/ThrowCompletion'); | ||
while (true) { // step 6 | ||
var next = IteratorStep(iterated); // step 6.a | ||
if (!next) { | ||
var value = IteratorStepValue(iterated); // step 6.a | ||
if (iterated['[[Done]]']) { | ||
return false; // step 6.b | ||
} | ||
var value = IteratorValue(next); // step 6.c | ||
var result; | ||
try { | ||
result = Call(predicate, void undefined, [value, counter]); // step 6.d | ||
result = Call(predicate, void undefined, [value, counter]); // step 6.c | ||
} catch (e) { | ||
// close iterator // step 6.e | ||
// close iterator // step 6.d | ||
IteratorClose( | ||
@@ -55,3 +51,3 @@ iterated, | ||
} finally { | ||
counter += 1; // step 6.g | ||
counter += 1; // step 6.f | ||
} | ||
@@ -62,5 +58,5 @@ if (ToBoolean(result)) { | ||
NormalCompletion(true) | ||
); // step 6.f | ||
); // step 6.e | ||
} | ||
} | ||
}; |
'use strict'; | ||
var GetIntrinsic = require('get-intrinsic'); | ||
var $RangeError = require('es-errors/range'); | ||
var $TypeError = require('es-errors/type'); | ||
var $RangeError = GetIntrinsic('%RangeError%'); | ||
var $TypeError = GetIntrinsic('%TypeError%'); | ||
var CompletionRecord = require('es-abstract/2023/CompletionRecord'); | ||
@@ -12,4 +10,3 @@ var CreateIteratorFromClosure = require('../aos/CreateIteratorFromClosure'); | ||
var IteratorClose = require('../aos/IteratorClose'); | ||
var IteratorStep = require('es-abstract/2023/IteratorStep'); | ||
var IteratorValue = require('es-abstract/2023/IteratorValue'); | ||
var IteratorStepValue = require('../aos/IteratorStepValue'); | ||
var NormalCompletion = require('es-abstract/2023/NormalCompletion'); | ||
@@ -72,9 +69,7 @@ var ToIntegerOrInfinity = require('es-abstract/2023/ToIntegerOrInfinity'); | ||
var next = IteratorStep(iterated); // step 9.b.iii | ||
if (!next) { | ||
// return void undefined; // step 9.b.iv | ||
return sentinel; | ||
var value = IteratorStepValue(iterated); // step 6.b.i | ||
if (iterated['[[Done]]']) { | ||
return sentinel; // step 6.b.ii | ||
} | ||
var value = IteratorValue(next); // step 9.b.iii | ||
return value; // step 9.b.iv | ||
@@ -81,0 +76,0 @@ // } |
'use strict'; | ||
var GetIntrinsic = require('get-intrinsic'); | ||
var $TypeError = require('es-errors/type'); | ||
var $TypeError = GetIntrinsic('%TypeError%'); | ||
var GetIteratorDirect = require('../aos/GetIteratorDirect'); | ||
var IteratorStep = require('es-abstract/2023/IteratorStep'); | ||
var IteratorValue = require('es-abstract/2023/IteratorValue'); | ||
var IteratorStepValue = require('../aos/IteratorStepValue'); | ||
var Type = require('es-abstract/2023/Type'); | ||
@@ -33,9 +30,8 @@ | ||
while (true) { // step 5 | ||
var next = IteratorStep(iterated); // step 5.a | ||
if (!next) { | ||
var value = IteratorStepValue(iterated); // step 5.a | ||
if (iterated['[[Done]]']) { | ||
return items; // step 5.b | ||
} | ||
var value = IteratorValue(next); // step 5.c | ||
$push(items, value); // step 5.d | ||
} | ||
}; |
@@ -6,3 +6,3 @@ 'use strict'; | ||
var $TypeError = GetIntrinsic('%TypeError%'); | ||
var $TypeError = require('es-errors/type'); | ||
var $defineProperty = hasPropertyDescriptors && GetIntrinsic('%Object.defineProperty%', true); | ||
@@ -9,0 +9,0 @@ |
{ | ||
"name": "es-iterator-helpers", | ||
"version": "1.0.15", | ||
"version": "1.0.16", | ||
"description": "An ESnext spec-compliant iterator helpers shim/polyfill/replacement that works as far down as ES3.", | ||
@@ -135,15 +135,16 @@ "main": "index.json", | ||
"asynciterator.prototype": "^1.0.0", | ||
"call-bind": "^1.0.2", | ||
"call-bind": "^1.0.6", | ||
"define-properties": "^1.2.1", | ||
"es-abstract": "^1.22.1", | ||
"es-set-tostringtag": "^2.0.1", | ||
"function-bind": "^1.1.1", | ||
"get-intrinsic": "^1.2.1", | ||
"es-abstract": "^1.22.3", | ||
"es-errors": "^1.3.0", | ||
"es-set-tostringtag": "^2.0.2", | ||
"function-bind": "^1.1.2", | ||
"get-intrinsic": "^1.2.4", | ||
"globalthis": "^1.0.3", | ||
"has-property-descriptors": "^1.0.0", | ||
"has-property-descriptors": "^1.0.1", | ||
"has-proto": "^1.0.1", | ||
"has-symbols": "^1.0.3", | ||
"internal-slot": "^1.0.5", | ||
"internal-slot": "^1.0.7", | ||
"iterator.prototype": "^1.1.2", | ||
"safe-array-concat": "^1.0.1" | ||
"safe-array-concat": "^1.1.0" | ||
}, | ||
@@ -153,7 +154,7 @@ "devDependencies": { | ||
"@ljharb/eslint-config": "^21.1.0", | ||
"aud": "^2.0.3", | ||
"aud": "^2.0.4", | ||
"auto-changelog": "^2.4.0", | ||
"es-value-fixtures": "^1.4.2", | ||
"eslint": "=8.8.0", | ||
"eslint-plugin-import": "^2.28.1", | ||
"eslint-plugin-import": "^2.29.1", | ||
"evalmd": "^0.0.19", | ||
@@ -163,12 +164,12 @@ "for-each": "^0.3.3", | ||
"has-strict-mode": "^1.0.1", | ||
"has-tostringtag": "^1.0.0", | ||
"has-tostringtag": "^1.0.2", | ||
"in-publish": "^2.0.1", | ||
"iterate-iterator": "^1.0.2", | ||
"make-generator-function": "^2.0.0", | ||
"mock-property": "^1.0.0", | ||
"npmignore": "^0.3.0", | ||
"mock-property": "^1.0.3", | ||
"npmignore": "^0.3.1", | ||
"nyc": "^10.3.2", | ||
"object-inspect": "^1.12.3", | ||
"object-inspect": "^1.13.1", | ||
"safe-publish-latest": "^2.0.0", | ||
"tape": "^5.6.6" | ||
"tape": "^5.7.4" | ||
}, | ||
@@ -187,3 +188,6 @@ "auto-changelog": { | ||
] | ||
}, | ||
"engines": { | ||
"node": ">= 0.4" | ||
} | ||
} |
'use strict'; | ||
var GetIntrinsic = require('get-intrinsic'); | ||
var $TypeError = require('es-errors/type'); | ||
var $TypeError = GetIntrinsic('%TypeError%'); | ||
var Call = require('es-abstract/2023/Call'); | ||
@@ -8,0 +6,0 @@ var CreateIterResultObject = require('es-abstract/2023/CreateIterResultObject'); |
Sorry, the diff of this file is not supported yet
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
155330
116
15
3642
+ Addedes-errors@^1.3.0
Updatedcall-bind@^1.0.6
Updatedes-abstract@^1.22.3
Updatedes-set-tostringtag@^2.0.2
Updatedfunction-bind@^1.1.2
Updatedget-intrinsic@^1.2.4
Updatedinternal-slot@^1.0.7
Updatedsafe-array-concat@^1.1.0