ranges-ent-decode
Recursive HTML entity decoding for Ranges workflow
Install
This package is pure ESM. If you're not ready yet, install an older version of this program, 4.1.0 (npm i ranges-ent-decode@4.1.0
).
npm i ranges-ent-decode
Quick Take
import { strict as assert } from "assert";
import { rEntDecode } from "ranges-ent-decode";
// see codsen.com/ranges/
assert.deepEqual(rEntDecode("a & b & c"), [
[2, 8, "&"], // <--- that's Ranges notation, instructing to replace
[11, 16, "&"],
]);
Documentation
Please visit codsen.com for a full description of the API.
Contributing
To report bugs or request features or assistance, raise an issue on GitHub.
Licence
MIT License.
Copyright © 2010-2024 Roy Revelt and other contributors.
Some tests and some regexes adapted from he.js MIT Licence - Copyright © 2013-2018 Mathias Bynens https://mathiasbynens.be/ https://github.com/mathiasbynens/he