Skip to content

EvanBacon/text-decoder

Repository files navigation

@bacons/text-decoder

This is now in Expo SDK 52 https://docs.expo.dev/versions/v52.0.0/sdk/encoding/

In Expo SDK 51 (React Native 74), Hermes supports TextEncoder natively but not TextDecoder. This library provides a TextDecoder implementation for Hermes that only supports UTF-8 (all legacy encodings are removed for bundle size).

You can install it on the global with:

import "@bacons/text-decoder/install";

Supports web, ios, android, server, and the upcoming Expo React Server environment for native platforms.

The implementation is a fork of text-encoding with all legacy encodings, and TextEncoder removed.

The tests were ported over too to ensure everything works as described.

About

Small TextDecoder polyfill for Expo +51 apps.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published