Détail du package

ranges-process-outside

codsen3.2kMIT6.0.19

Iterate string considering ranges, as if they were already applied

array, indexes, ranges, sort

readme

ranges-process-outside

Iterate string considering ranges, as if they were already applied

page on codsen.com page on npm page on github Downloads per month changelog MIT Licence

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-process-outside@4.1.0).

npm i ranges-process-outside

Quick Take

import { strict as assert } from "assert";

import { rProcessOutside } from "ranges-process-outside";

const gathered = [];

// a callback interface:
rProcessOutside(
  "abcdefghij",
  [
    [1, 5], // delete from "b" to "f"
  ],
  (fromIdx, toIdx, offsetValueCb) => {
    gathered.push(fromIdx);
  },
);

assert.deepEqual(gathered, [0, 5, 6, 7, 8, 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-2025 Roy Revelt and other contributors.

ok codsen star

changelog

Change Log

All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.

6.0.0 (2022-12-01)

BREAKING CHANGES

  • Minimum supported Node version is v14.18; we're dropping v12 support

5.1.0 (2022-08-12)

Features

5.0.0 (2021-09-09)

Features

BREAKING CHANGES

  • programs now are in ES Modules and won't work with Common JS require()

4.1.0 (2021-05-24)

Features

  • config file based major bump blacklisting (e15f9bb)

4.0.15 (2021-04-11)

Reverts

  • Revert "chore: setup refresh" (23cf206)

4.0.1 (2021-01-28)

Fixed

  • add testStats to npmignore (f3c84e9)

4.0.0 (2021-01-23)

Features

  • rewrite in TS, start using named exports (292a653)

BREAKING CHANGES

  • previously you'd consume like: import rProcessOutside from ... - now: import { rProcessOutside } from ...

3.0.0 (2020-11-28)

Accidental version bump during migration to SourceHut. Sorry about that.

2.2.0 (2019-08-18)

Features

2.1.0 (2019-06-01)

Features

  • Change of the API - ranges are inverted and each character called via cb() (cd2e2be)
  • Offsets (7ae4a8c)

1.0.0 (2018-01-23)

  • Initial release