Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hildjj/ctoaf-textdecoder
Simple TextDecoder polyfill
https://github.com/hildjj/ctoaf-textdecoder
Last synced: 19 days 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 3 years ago)
- Default Branch: main
- Last Pushed: 2024-06-24T23:42:28.000Z (5 months ago)
- Last Synced: 2024-10-18T20:36:08.730Z (28 days ago)
- Language: JavaScript
- Size: 39.1 KB
- Stars: 0
- Watchers: 3
- 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)
[![Tests](https://github.com/hildjj/ctoaf-textdecoder/actions/workflows/node.js.yml/badge.svg)](https://github.com/hildjj/ctoaf-textdecoder/actions/workflows/node.js.yml)