node-lazy-range
Lazy Range function for JS. Exposes forEach forEachAsync and toArray
npm install lazy-range
Example.js
var range =/*Faster than Array.map since it doesarray composition and function application in same step*/var arr =// You can also use a step param; // where step == 2//[0, 2, 4, 6, 8]console/*You can still do*/arr =console/*As well we can just execute a function against a range but not return an array*//*As well we can execute Async*/console
Results: (example.js)
5 10 15 20 25 30 35 40 45 502 4 6 8 10 12 14 16 18 2027182818284590457389056098930652008553692318766854598150033144236148413159102576640342879349273511096633158428458529809579870417283810308392757538422026465794806718This should come firstnum:2718281828459045num:738905609893065num:20085536923187668num:54598150033144236num:1484131591025766num:4034287934927351num:10966331584284585num:29809579870417283num:8103083927575384num:22026465794806718