Sha256: d4c2aa513fcd4d88f4f75bed415985fa09e6f63cb2bfc81400cadb5d79de3e02
Contents?: true
Size: 404 Bytes
Versions: 40
Compression:
Stored size: 404 Bytes
Contents
// call something on iterator step with safe closing on error var anObject = require('./$.an-object'); module.exports = function(iterator, fn, value, entries){ try { return entries ? fn(anObject(value)[0], value[1]) : fn(value); // 7.4.6 IteratorClose(iterator, completion) } catch(e){ var ret = iterator['return']; if(ret !== undefined)anObject(ret.call(iterator)); throw e; } };
Version data entries
40 entries across 18 versions & 7 rubygems