Text Codec
@borewit/text-codec
Text Decoder
Utilities
TextDecoder
TextEncoder
decoder
decoding
encod
encoding
decode
text
ascii
utf-8
Stars
3
Weekly
16M
Open issues
4
Bundle
~15 kB
Installation
npm install @borewit/text-codecCode example
import { useTextCodec } from "@borewit/text-codec";
export function Example() {
const value = useTextCodec();
return <p>{String(value)}</p>;
}Pros & cons
Pros
- Actively maintained by Borewit
- 16M weekly downloads. Battle tested
- First-class TypeScript definitions
- MIT licensed
Considerations
- Adds roughly ~15 kB to your bundle
- Needs client-only rendering in SSR frameworks
- Not supported in React Native
- 4 open issues on GitHub