Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@cto.af/textdecoder

hildjj200.2kMIT0.2.4

Quick wrapper that finds TextDecoder in your runtime, or uses an adequate polyfill

TextDecoder, utf8, utf-8, polyfill

readme

Simple TextDecoder polyfill

I needed this in two different projects, so I pulled it out. All of the existing TextDecoder polyfills try to do too much for what I needed. The goal here is to NOT require any Unicode tables, keeping this as small as possible.

This just finds the best TextDecoder instance it can, and mocks in an adequate one for old or broken environments.

Use

const TextDecoder = require('@cto.af/textdecoder')

API

See MDN

Tests codecov