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

Function checkDangerIterClosing

lib/web/polyfill.js:555–566  ·  view source on GitHub ↗
(fn)

Source from the content-addressed store, hash-verified

553 return entries ? invoke(fn, value) : fn(value);
554}
555function checkDangerIterClosing(fn){
556 var danger = true;
557 var O = {
558 next: function(){ throw 1 },
559 'return': function(){ danger = false }
560 };
561 O[SYMBOL_ITERATOR] = returnThis;
562 try {
563 fn(O);
564 } catch(e){}
565 return danger;
566}
567function closeIterator(iterator){
568 var ret = iterator['return'];
569 if(ret !== undefined)ret.call(iterator);

Callers 2

polyfill.jsFile · 0.85
getCollectionFunction · 0.85

Calls 1

fnFunction · 0.85

Tested by

no test coverage detected