The Readme currently claims that this project does not work in browsers, but this is wrong. I think the note in the Readme was originally meant to claim that the project no longer worked in pre-ES6 browsers, but that hasn't described any modern browsers for years now. This library works perfectly fine when used as directly a native ES6 module in browsers (try await import('https://unpkg.com/punycode@2.1.1/punycode.es6.js') in your browser console) or when used with a bundler like Webpack. (Webpack v5's documentation even explicitly recommends using this library as a shim for the Node "punycode" API when targeting browsers.)
This PR tweaks a line in the readme to emphasize that browser support does in fact work.
The Readme currently claims that this project does not work in browsers, but this is wrong. I think the note in the Readme was originally meant to claim that the project no longer worked in pre-ES6 browsers, but that hasn't described any modern browsers for years now. This library works perfectly fine when used as directly a native ES6 module in browsers (try
await import('https://unpkg.com/punycode@2.1.1/punycode.es6.js')
in your browser console) or when used with a bundler like Webpack. (Webpack v5's documentation even explicitly recommends using this library as a shim for the Node "punycode" API when targeting browsers.)This PR tweaks a line in the readme to emphasize that browser support does in fact work.