keichi / binary-parser

A blazing-fast declarative parser builder for binary data
MIT License
864 stars 134 forks source link

Support IE11 #161

Closed szaboge closed 3 years ago

szaboge commented 3 years ago

Hi!

Internet Explorer 11 don't support this lib, because it uses TextDecoder what not supported in IE11. That can be bridged, with using text-encoding library.

TextDecoder support: https://developer.mozilla.org/en-US/docs/Web/API/TextDecoder text-encoding lib: https://www.npmjs.com/package/text-encoding or https://www.npmjs.com/package/fast-text-encoding

Thanks. :)

keichi commented 3 years ago

This should be fixed now.

manzt commented 2 years ago

Thank you for your work on this high-quality project. I hate to be this person, but is there any chance this dependency could be removed from this package? Baking in a polyfill means that the script can't be adopted to import directly in the browser, which is shame because it is very high quality and relies on no node builtins. Polyfills can always be injected via a build script, which is required since project only publishes a commonjs module.

keichi commented 2 years ago

Yes we can remove IE11 support in the next major release. >95% of clients support the TextEncoder/Decoder API now. https://caniuse.com/textencoder