Update checked-in dependencies
This commit is contained in:
parent
1afca056e3
commit
6989ba7bd2
3942 changed files with 55190 additions and 132206 deletions
10
node_modules/es-abstract/2023/IteratorClose.js
generated
vendored
10
node_modules/es-abstract/2023/IteratorClose.js
generated
vendored
|
|
@ -1,8 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
var $TypeError = require('es-errors/type');
|
||||
|
||||
var Call = require('./Call');
|
||||
var CompletionRecord = require('./CompletionRecord');
|
||||
|
|
@ -10,12 +8,14 @@ var GetMethod = require('./GetMethod');
|
|||
var IsCallable = require('./IsCallable');
|
||||
var Type = require('./Type');
|
||||
|
||||
var assertRecord = require('../helpers/assertRecord');
|
||||
var isIteratorRecord = require('../helpers/records/iterator-record');
|
||||
|
||||
// https://262.ecma-international.org/14.0/#sec-iteratorclose
|
||||
|
||||
module.exports = function IteratorClose(iteratorRecord, completion) {
|
||||
assertRecord(Type, 'Iterator Record', 'iteratorRecord', iteratorRecord);
|
||||
if (!isIteratorRecord(iteratorRecord)) {
|
||||
throw new $TypeError('Assertion failed: `iteratorRecord` must be an Iterator Record'); // step 1
|
||||
}
|
||||
if (Type(iteratorRecord['[[Iterator]]']) !== 'Object') {
|
||||
throw new $TypeError('Assertion failed: iteratorRecord.[[Iterator]] must be an Object'); // step 1
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue