feross / simple-get

Simplest way to make http get requests. Supports HTTPS, redirects, gzip/deflate, streams in < 100 lines
MIT License
401 stars 50 forks source link

ES5 Support #25

Closed Miserlou closed 7 years ago

Miserlou commented 7 years ago

I need to use simple-get with ES5, which isn't do-able because of Object.assign({}, opts) (and maybe some others..).

feross commented 7 years ago

I sympathize, but Object.assign is pretty pervasive these days. It's only missing in unsupported versions of Node and IE11 (3.8% marketshare).

Workaround to make it work for you: run it thru browserify -t bubleify and require that resulting file directly.

Miserlou commented 7 years ago

That's browser marketshare, and there are other places where Node is used, but sure.

For all those who end up here, I've published a polyfilled version to NPM: https://github.com/Miserlou/simple-get-es5

feross commented 7 years ago

@Miserlou Thanks for doing that.