
Security News
Socket Releases Free Certified Patches for Critical vm2 Sandbox Escape
A critical vm2 sandbox escape can allow untrusted JavaScript to break isolation and execute commands on the host Node.js process.
@iterable-iterator/range
Advanced tools
A range function for JavaScript. See docs.
:warning: Depending on your environment, the code may require
regeneratorRuntimeto be defined, for instance by importing regenerator-runtime/runtime.
import {range} from '@iterable-iterator/range';
range( 3 ) ; // 0 1 2
range( 2 , 5 ) ; // 2 3 4
range( 5 , 2 , -1 ) ; // 5 4 3
range(Number.MAX_SAFE_INTEGER).has(1234); // true
range(0, 10, 2).get(3); // 6
// If you only use the iterator feature you can save bytes by calling the
// IterableIterator function directly
import {forwardRangeIterator, backwardRangeIterator} from '@iterable-iterator/range';
for (const x of forwardRangeIterator(0, 10, 1)) ...
for (const x of backwardRangeIterator(10, 0, -1)) ...
// caveat: This requires you to specify all parameters, and choose the correct
// implementation depending on the sign of the `step` parameter.
// For convenience, rangeIterator will return the correct kind of
// IterableIterator without constructing a Range object. It has the same signature
// as the range function.
import {rangeIterator as range} from '@iterable-iterator/range';
FAQs
A range function for JavaScript
The npm package @iterable-iterator/range receives a total of 69 weekly downloads. As such, @iterable-iterator/range popularity was classified as not popular.
We found that @iterable-iterator/range 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
A critical vm2 sandbox escape can allow untrusted JavaScript to break isolation and execute commands on the host Node.js process.

Research
Five malicious NuGet packages impersonate Chinese .NET libraries to deploy a stealer targeting browser credentials, crypto wallets, SSH keys, and local files.

Security News
pnpm 11 turns on a 1-day Minimum Release Age and blocks exotic subdeps by default, adding safeguards against fast-moving supply chain attacks.