ranges-invert
v6.0.16
Published
Invert string index ranges
Downloads
4,087
Maintainers
Readme
Install
This package is pure ESM. If you're not ready yet, install an older version of this program, 4.1.0 (npm i [email protected]
).
npm i ranges-invert
Quick Take
import { strict as assert } from "assert";
import { rInvert } from "ranges-invert";
assert.deepEqual(
rInvert(
[
[3, 5],
[5, 7],
],
9, // string length needed to set the boundary
),
[
[0, 3],
[7, 9],
],
);
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.