web 3d图形渲染器
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
498 B

  1. 'use strict';
  2. var GetIntrinsic = require('get-intrinsic');
  3. var $TypeError = GetIntrinsic('%TypeError%');
  4. var Get = require('./Get');
  5. var ToBoolean = require('./ToBoolean');
  6. var Type = require('./Type');
  7. // https://ecma-international.org/ecma-262/6.0/#sec-iteratorcomplete
  8. module.exports = function IteratorComplete(iterResult) {
  9. if (Type(iterResult) !== 'Object') {
  10. throw new $TypeError('Assertion failed: Type(iterResult) is not Object');
  11. }
  12. return ToBoolean(Get(iterResult, 'done'));
  13. };