
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

rangr is a tool to manage ranges and sets. It's inspired from the LeetCode's Merge Interval problem.
⚠️ NOT ready for production use.
import Rangr from 'rangr';
const range: Rangr = new Rangr([ [1,3], [2,6], [8,10], [15,18] ]);
console.log(range.toString());
// [1,6],[8,10],[15,18]
range.add([ [ 10, 11 ], [11, 20] ]);
console.log(range.toString());
// [1,6],[8,20]
To get ranges as an array, use .toArray() method provided.
Example:
const range: Rangr = new Rangr([ [1,3], [2,6] ]);
const arr = range.toArray(); // [ [ 1, 6 ] ]
To get ranges as an iterable, use .toIterable() method provided.
Example:
const range: Rangr = new Rangr([ [1,3], [2,6] ]);
const rangeIterator = range.toIterable();
rangeIterator.next(); // { value: [ 1, 6 ], done: false }
rangeIterator.next(); // { value: undefined, done: true }
rangr supports both ECMAScript Modules and CommonJS using Conditional Exports provided by Node.js.
const Rangr = require('rangr');
import Rangr from 'rangr';
The package is not very performant in managing th ranges and lacks a rich API. Contributions in the form of issues and PRs are welcome! 🙌🏽
npm i rangr
npm test
FAQs
Manage ranges and overlaps between them
We found that rangr demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.