https://github.com/hildjj/ctoaf-textdecoder
Simple TextDecoder polyfill
https://github.com/hildjj/ctoaf-textdecoder
Last synced: about 23 hours 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 (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2024-06-24T23:42:28.000Z (over 1 year ago)
- Last Synced: 2025-03-16T20:51:18.198Z (10 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 an adequate
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)
[](https://codecov.io/gh/hildjj/ctoaf-textdecoder)