MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / safeIterClose

Function safeIterClose

lib/web/polyfill.js:571–578  ·  view source on GitHub ↗
(exec, iterator)

Source from the content-addressed store, hash-verified

569 if(ret !== undefined)ret.call(iterator);
570}
571function safeIterClose(exec, iterator){
572 try {
573 exec(iterator);
574 } catch(e){
575 closeIterator(iterator);
576 throw e;
577 }
578}
579function forOf(iterable, entries, fn, that){
580 safeIterClose(function(iterator){
581 var f = ctx(fn, that, entries ? 2 : 1)

Callers 2

forOfFunction · 0.85
polyfill.jsFile · 0.85

Calls 1

closeIteratorFunction · 0.85

Tested by

no test coverage detected