Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/oguzhanumutlu/async-loop-js
Async Loops for JavaScript
https://github.com/oguzhanumutlu/async-loop-js
async helper javascript loop node web
Last synced: 27 days ago
JSON representation
Async Loops for JavaScript
- Host: GitHub
- URL: https://github.com/oguzhanumutlu/async-loop-js
- Owner: OguzhanUmutlu
- License: mit
- Created: 2022-03-30T05:56:07.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-03-30T13:54:40.000Z (almost 3 years ago)
- Last Synced: 2024-11-07T00:47:21.990Z (3 months ago)
- Topics: async, helper, javascript, loop, node, web
- Language: JavaScript
- Homepage:
- Size: 2.93 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# async-loop-js
Async Loops for JavaScript# Examples
### `.startWhile()` example
```js
await AsyncLoop.startWhile({
statement: i => i < 10,
callback: i => console.log(`Iterating while for ${i}. time.`),
endCallback: i => console.log(`Iteration for while has ended at ${i}. iteration`),
ms: 20 // will repeat every 20ms
});
```### `.repeat()` example
```js
await AsyncLoop.repeat({
iterations: 10,
callback: i => console.log(`Iterating repeat for ${i}. time.`),
endCallback: i => console.log(`Iteration for repeat has ended at ${i}. iteration`),
ms: 20 // will repeat every 20ms
});
```