for-do

1.0.0 • Public • Published

for-do

Features

  • Simple counting-down loop

Examples

for(...).do(...)

var fd = require('for-do');
fd.for(10).do((count) => console.log(`countdown: ${count}`));

for...of...

var fd = require('for-do');
for (let count of fd.for(10)) {
    console.log(`countdown: ${count}`);
}
  • FACT: This package is bases on x-iterable and creates XIterable objects, which means that the object also has ::forEach, ::map, ::every, ::some, ... methods, use them wisely

Package Sidebar

Install

npm i for-do

Weekly Downloads

1

Version

1.0.0

License

MIT

Last publish

Collaborators

  • khai96_