mirror of
https://github.com/cloudflare/wrangler-action.git
synced 2024-11-27 12:14:45 +01:00
18 lines
438 B
JavaScript
18 lines
438 B
JavaScript
'use strict';
|
|
|
|
var GetIntrinsic = require('get-intrinsic');
|
|
|
|
var $TypeError = GetIntrinsic('%TypeError%');
|
|
|
|
var Get = require('./Get');
|
|
var Type = require('./Type');
|
|
|
|
// https://262.ecma-international.org/6.0/#sec-iteratorvalue
|
|
|
|
module.exports = function IteratorValue(iterResult) {
|
|
if (Type(iterResult) !== 'Object') {
|
|
throw new $TypeError('Assertion failed: Type(iterResult) is not Object');
|
|
}
|
|
return Get(iterResult, 'value');
|
|
};
|
|
|