
Security News
Open Source CAI Framework Handles Pen Testing Tasks up to 3,600× Faster Than Humans
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Generate a range between two numbers or letters. Examples: 1-100, a-z, A-Z, a-zz or even A-ZZZZZ.
Install: npm install rangegen
Generate a range between two numbers or letters. Examples: 1-100, a-z, A-Z, a-zz or even A-ZZZZZ.
Online example: http://louist.github.io/RangeGen/example.html
View more examples on GitHub.
*WARNING* Running range on a big letter gap causes MANY loops!
For instance, a-zzzzz creates an array with 12,356,630
indexes and does 73,645,526 while and for loops!
-- Array generator (See "examples.js" for usage) --
var array = RangeGen(<from>,<to>,[<step>[,<exceptions>[,<CB/filter>]]]);
From - The letter or number to start the range at. (Number, Float, Letters)
To - The letter or number to end on/near. (Number, Float, Letters)
Step* - The amount to increment or decrement by. Default, 1. (Boolean, Number, Float)
Exceptions* - Throw error messages. Default, return an empty array. (Boolean)
CB/filter* - Use a callback or filter results. (see example4.js)
* Optional.
-- Check to see if a number or letter is in a range. (Case sensitive, "AB" is not in "a..az". See "examples4.js" for usage) --
RangeGen.inRange(<str>,<from>,<to>[,<step>[,<exceptions>[,<callback>]]]);
Str - The number(s) or letter(s) to validate. (Number, Float, Letters)
From - The letter or number to start the range at. (Number, Float, Letters)
To - The letter or number to end on/near. (Number, Float, Letters)
Step* - The amount to increment or decrement by. Default, 1. (Boolean, Number, Float)
Exceptions* - Throw error messages. Default, return false. (Boolean)
Callback* - Use a callback instead of return.
* Optional.
-- Get the Nth value in a given range. (See "examples4.js" for usage) --
RangeGen.byIndex(<num>,<from>,<to>,[<step>[,<exceptions>[,<callback>]]]);
Num - The index number within the range. (Number)
From - The letter or number to start the range at. (Number, Float, Letters)
To - The letter or number to end on/near. (Number, Float, Letters)
Step* - The amount to increment or decrement by. Default, 1. (Boolean, Number, Float)
Exceptions* - Throw error messages. Default, return false. (Boolean)
Callback* - Use a callback instead of return.
* Optional.
-- Get the index by value in a given range. (See "examples4.js" for usage) --
RangeGen.byValue(<str>,<from>,<to>,[<step>[,<exceptions>[,<callback>]]]);
Str - The value within the range. (Number, Float, Letters)
From - The letter or number to start the range at. (Number, Float, Letters)
To - The letter or number to end on/near. (Number, Float, Letters)
Step* - The amount to increment or decrement by. Default, 1. (Boolean, Number, Float)
Exceptions* - Throw error messages. Default, return false. (Boolean)
Callback* - Use a callback instead of return.
* Optional.
-- Inject "range()" into the String prototype. (See "examples4.js" for usage) --
RangeGen.addPrototype();
RangeGen.addPro();
Usage: "FROM..TO".range([<step>[,<exceptions>[,<callback>]]]);
From - The letter or number to start the range at. (Number, Float, Letters)
To - The letter or number to end on/near. (Number, Float, Letters)
Step* - The amount to increment or decrement by. Default, 1. (Boolean, Number, Float)
Exceptions* - Throw error messages. Default, return false. (Boolean)
Callback* - Use a callback instead of return.
* Optional.
-- Readable stream. (Node.js ONLY, See examples5.js for usage) --
var stream = RangeGen.createReadStream(<from>,<to>[,<step>]);
RangeGen.CRS(<from>,<to>[,<step>]);
From - The letter or number to start the range at. (Number, Float, Letters)
To - The letter or number to end on/near. (Number, Float, Letters)
Step* - The amount to increment or decrement by. Default, 1. (Boolean, Number, Float)
NOTE: If you use this outside of Node.js it will throw a "NodeOnly" error!
Stream API: http://nodejs.org/api/stream.html#stream_class_stream_readable
-- Iterators. (See "examples2.js" for usage) --
var iterator = RangeGen.iterator(<from>,<to>[,<step>[,<exceptions>]]);
RangeGen.iter(<from>,<to>[,<step>[,<exceptions>]]);
hasNext() - Returns true if the iteration has more elements.
next() - Returns the next element in the iteration, or false if `exceptions` is not set.
Otherwise throws a `NoSuchElement` exception.
length - The total number of iterations.
left - The number of iterations left.
FAQs
Generate a range between two numbers or letters. Examples: 1-100, a-z, A-Z, a-zz or even A-ZZZZZ.
We found that rangegen 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
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.
Security News
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.