https://github.com/sugiruu/a-syncquence
Simple sync queue for async tasks
https://github.com/sugiruu/a-syncquence
async js node queue sync task
Last synced: 27 days ago
JSON representation
Simple sync queue for async tasks
- Host: GitHub
- URL: https://github.com/sugiruu/a-syncquence
- Owner: sugiruu
- License: mit
- Created: 2017-06-05T13:34:25.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2019-07-14T00:57:19.000Z (almost 6 years ago)
- Last Synced: 2025-02-25T12:39:18.839Z (2 months ago)
- Topics: async, js, node, queue, sync, task
- Language: JavaScript
- Size: 32.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Simple sync queue for async tasks
a-syncquence provides a simple queue for async tasks.
## API
### ASyncquence.start()
Start the queue### ASyncquence.stop()
Stop the queue### ASyncquence.next()
Emits a `next` event### ASyncquence.push()
Appends a new task to the end of the queue### ASyncquence.unshift()
Appends a new task to the beginning of the queue### ASyncquence.count()
Number of tasks queued### ASyncquence.clear()
Clear the queue### ASyncquence.isRunning()
Whether the queue is running### ASyncquence.onError()
Binds an `error` event if there is none### ASyncquence.onEnd()
Binds an `end` event if there is none### ASyncquence.onNext()
Binds an `next` event if there is none## EVENTS
### end
Emitted when the queue is empty### next
Emitted when the queue starts the "next" task### error
Emitted when the current task throws an error