1.0.1 • Published 6 years ago

whiler v1.0.1

Weekly downloads
164
License
MIT
Repository
github
Last release
6 years ago

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