Polyfill for the Encoding Living Standard's API.
npm install @zxing/text-encodingtext-encoding
==============
This is a fork of https://github.com/inexorabletash/text-encoding, which
has been marked as deprecated in the npm registry.
``
npm info text-encoding
text-encoding@0.7.0 | (Unlicense OR Apache-2.0) | deps: none | versions: 11
Polyfill for the Encoding Living Standard's API.
https://github.com/inexorabletash/text-encoding
DEPRECATED ⚠️ - no longer maintained
keywords: encoding, decoding, living standard
dist
.tarball: https://registry.npmjs.org/text-encoding/-/text-encoding-0.7.0.tgz
.shasum: f895e836e45990624086601798ea98e8f36ee643
.integrity: sha512-oJQ3f1hrOnbRLOcwKz0Liq2IcrvDeZRHXhd9RgLrsT+DjWY/nty1Hi7v3dtkaEYbPYe0mUoOfzRrMwfXXwgPUA==
.unpackedSize: 649.6 kB
maintainers:
- inexorabletash
dist-tags:
latest: 0.7.0
published a year ago by inexorabletash
`
This fork is published as @zxing/text-encoding and will be available as long@zxing
as it is in use by packages.
This is a polyfill for the Encoding Living
Standard API for the Web, allowing
encoding and decoding of textual data to and from Typed Array buffers
for binary data in JavaScript.
By default it adheres to the spec and does not support encoding to
legacy encodings, only decoding. It is also implemented to match the
specification's algorithms, rather than for performance. The intended
use is within Web pages, so it has no dependency on server frameworks
or particular module schemes.
Basic examples and tests are included.
There are a few ways you can get and use the @zxing/text-encoding library.
Clone the repo and include the files directly:
`html`
This is the only use case the developer cares about. If you want those
fancy module and/or package manager things that are popular these days
you should probably use a different library.
#### Package Managers ####
The package is published to npm as @zxing/text-encoding.require()
Use through these is not really supported, since they aren't used by
the developer of the library. Using in interesting ways
probably breaks. Patches welcome, as long as they don't break the
basic use of the files via
`
To support the legacy encodings (which may be stateful), the
TextEncoder encode() method accepts an optional dictionary andstream option, e.g. encoder.encode(string, {stream: true});` This
is not needed for standard encoding since the input is always in
complete code points.