iterator-close.js 230 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 var anObject = require('../internals/an-object'); module.exports = function (iterator) { var returnMethod = iterator['return']; if (returnMethod !== undefined) { return anObject(returnMethod.call(iterator)).value; } };