forked from JakeChampion/fetch
-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed
Description
It should be possible to rewrite the code to not rely on both TextEncoder and TextDecoder, just like GitHub as done:
- Decode: https://github.com/github/fetch/blob/a8aa427de0ed808ff26c0e3eb2e59c122c44488a/test/test.js#L79
- Encode: https://github.com/github/fetch/blob/a8aa427de0ed808ff26c0e3eb2e59c122c44488a/test/test.js#L69
By removing the dependency on both APIs, the app's bundle size can be further reduced. Considering that React Native's environment does not provide these APIs, there would be no need to polyfill them anymore. However, we should, by default, check whether TextEncoder
and TextDecoder
are available and only then fallback.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed