whiler

1.0.1 • Public • Published

whiler

Simple endless cycle. Like while(true) but async.

Build Status NPM version

Install

npm i whiler

Usage

Takes a function as a parameter and runs it in loop while function return a truthy value or promise of a truthy value. Resolves when function return a falsy value or promise of a falsy value. Rejects when function throws or rejects.

const whiler = require('whiler');
whiler(someAsyncFunction).then(whatever);

License

MIT

Package Sidebar

Install

npm i whiler

Weekly Downloads

9

Version

1.0.1

License

MIT

Unpacked Size

3.63 kB

Total Files

8

Last publish

Collaborators

  • astur