node-lupus
Async looping for Node.js
Meta
- Author: Randall Degges
- Email: r@rdegges.com
- Twitter: @rdegges
- Site: http://www.rdegges.com
- Status: production ready
Installation
To install lupus
using npm, simply run:
$ npm install lupus
In the root of your project directory.
Usage
Once you have lupus
installed, you can use it to easily iterate over a large
set of numbers asynchronously (without locking up the CPU!):
var lupus = ; ;
Want to run some code after the loop is finished? No problem!
var lupus = ; ;
If you were to try the same thing with a typical for loop, you'd use up a TON of memory on your computer, as well as block the Node.js process from executing any other code (bad). Don't believe me? Try running the code sample below yourself =)
for var i = 0; i < 10000000; i++ console; console;
Author's Note
I didn't want to call this library lupus
, but I didn't really have a choice
since looper
was already taken! Darn.
I kinda-sorta figured oh well, let's just do this the weird way. Screw it.
Changelog
v0.0.1: 9-19-2014
- First release!