Closed rasmuskl closed 5 years ago
I'm fine with this change, thanks for the contribution.
Maybe one should retire Internet Explorer at some point in the future?
Maybe one should. Down to 2% of my visitors on IE 11 now, so hopefully soon.
But then again the IE users really need the FastBitSet.
Unfortunately
for
..of
loops are not supported at all in Internet Explorer, but this is the only part of FastBitSet.js that causes problems - forcing me to put it through Babel or another transpiler which most likely has other performance implications for an optimized library such as this one.This PR makes a simple change to convert the
for
..of
loop to use the underlying iterator in awhile
loop.It also adds a fallback for browsers that do not support iterators properly... (looking at you IE).
The impact on performance should be negligible and only touches set initialization.
Thanks for a great library!