Pot.js と PotLite.js で利用可能。
引数 o が StopIteration かどうかチェックします。
引数 o が StopIteration かどうかを調べます。
StopIteration は、Pot.StopIteration または ビルトインの StopIteration が対象になります。
o が StopIteration なら true を返します。違う場合は false を返します。
try {
throw StopIteration;
} catch (e) {
debug( isStopIter(e) ); // true;
try {
throw Pot.StopIteration;
} catch (ex) {
debug( isStopIter(ex) ); // true
try {
throw new Error('hoge');
} catch (err) {
debug( isStopIter(err) ); // false
}
}
}