https://github.com/hildjj/ctoaf-textdecoder
Simple TextDecoder polyfill
https://github.com/hildjj/ctoaf-textdecoder
Last synced: 3 months ago
JSON representation
Simple TextDecoder polyfill
- Host: GitHub
- URL: https://github.com/hildjj/ctoaf-textdecoder
- Owner: hildjj
- License: mit
- Created: 2021-02-27T08:53:08.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-06-24T23:42:28.000Z (12 months ago)
- Last Synced: 2025-03-16T20:51:18.198Z (3 months ago)
- Language: JavaScript
- Size: 39.1 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
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 a dirty one
for old or broken environments.## Use
```js
const TextDecoder = require('@cto.af/textdecoder')
```## API
See [MDN](https://developer.mozilla.org/en-US/docs/Web/API/TextDecoder)
[](https://github.com/hildjj/ctoaf-textdecoder/actions/workflows/node.js.yml)