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.

13 lines
427 B

  1. var anObject = require('../internals/an-object');
  2. var iteratorClose = require('../internals/iterator-close');
  3. // call something on iterator step with safe closing on error
  4. module.exports = function (iterator, fn, value, ENTRIES) {
  5. try {
  6. return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value);
  7. // 7.4.6 IteratorClose(iterator, completion)
  8. } catch (error) {
  9. iteratorClose(iterator);
  10. throw error;
  11. }
  12. };