
Security News
/Company News
Securing the Financial Frontier: How Capital One Uses Socket for Open Source Security
Capital One is partnering with Socket to proactively secure its open source supply chain.
ranges-sort
Advanced tools
Sort string index ranges
This package is pure ESM. If you're not ready yet, install an older version of this program, 4.1.0 (npm i ranges-sort@4.1.0).
npm i ranges-sort
import { strict as assert } from "assert";
import { rSort } from "ranges-sort";
// Ranges (see codsen.com/ranges/) are sorted:
assert.deepEqual(
rSort([
[2, 3],
[9, 10, "bad grey wolf"],
[1, 2],
]),
[
[1, 2],
[2, 3],
[9, 10, "bad grey wolf"],
],
);
Please visit codsen.com for a full description of the API.
To report bugs or request features or assistance, raise an issue on GitHub.
MIT License
Copyright © 2010-2025 Roy Revelt and other contributors

FAQs
Sort string index ranges
The npm package ranges-sort receives a total of 253,133 weekly downloads. As such, ranges-sort popularity was classified as popular.
We found that ranges-sort demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Security News
/Company News
Capital One is partnering with Socket to proactively secure its open source supply chain.

Security News
Socket CTO Ahmad Nassri discusses how to keep AI agents from bypassing package blocks, limit credential access, and monitor their actions.

Security News
GPT-6 Astra tried to plant malicious code in simulated open source projects using fake GitHub accounts and deceptive PRs during an assigned CTF challenge.