Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wankdanker/node-dank-do-while
An asynchronous do-while-like function for node.
https://github.com/wankdanker/node-dank-do-while
Last synced: 2 months ago
JSON representation
An asynchronous do-while-like function for node.
- Host: GitHub
- URL: https://github.com/wankdanker/node-dank-do-while
- Owner: wankdanker
- License: other
- Created: 2012-10-10T15:08:27.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2024-05-28T18:28:50.000Z (7 months ago)
- Last Synced: 2024-09-19T19:25:13.839Z (4 months ago)
- Language: JavaScript
- Size: 87.9 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
dank-do-while
---------------An asynchronous do-while-like function for node
install
-------```bash
npm install dank-do-while
```method
------### doWhile(eachFunction, doneFunction, concurrency);
**eachFunction** will be called once initially and then again
for each time that `next(truthy)` is calledSignature is `function(next)`
**doneFunction** will be called once when `next(falsy)` is called
**concurrency** the number of concurrent **eachFunction**'s that may be executed
example
-------```javascript
import { doWhile } from 'dank-do-while';doWhile(function (next) {
someAsyncFunction(function (err, result) {
return next(result !== 'done');
});
}, function () {
console.log('done');
});
```