
Product
Reachability for Ruby Now in Beta
Reachability analysis for Ruby is now in beta, helping teams identify which vulnerabilities are truly exploitable in their applications.
import range from 'lazyrange';
// for-of loops
for (let i of range(5)) {
// 0, 1, 2, 3, 4
}
// array-like iteration
range(5, 10).each(function(i) {
// 5, 6, 7, 8, 9
});
import range from 'lazyrange';
let foo = range(0, 5);
let bar = new range.Range(5, 0, -1);
Creates a range starting at 0 and ending at end using a step of 1.
Creates a range from start to end using a step that defaults to 1,
Shortcut method to return a new instance of a range.
Evaluates the range into an array.
let arr = range(5).toArray();
// [0, 1, 2, 3, 4]
Maps the range to an array.
var arr = range(5).map((value, index) => Math.pow(value, 2));
// [0, 1, 4, 9, 16]
Reduces the range to a value.
var val = range(5).reduce((memo, value, index) => memo + value, 0);
// 10
Iterates over each value in the range.
range(5).each(function(value, index) {
console.log(value);
});
Lazily iterate over each value in the range.
for (let i of range(5)) {
}
FAQs
Speedy ranges for node, inspired by Python.
We found that lazyrange 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.

Product
Reachability analysis for Ruby is now in beta, helping teams identify which vulnerabilities are truly exploitable in their applications.

Research
/Security News
Malicious npm packages use Adspect cloaking and fake CAPTCHAs to fingerprint visitors and redirect victims to crypto-themed scam sites.

Security News
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.