Skip to content

Latest commit

 

History

History
56 lines (41 loc) · 1.44 KB

README.md

File metadata and controls

56 lines (41 loc) · 1.44 KB

TaskQueue.js

TaskQueue.js is a JavaScript task queue management library for client and server side development.

Table of Contents

Installation

You can install TaskQueue.js using npm :

npm install taskqueue.js

Use

To use TaskQueue.js, you just need to import the library and create an instance of the task queue :

import TaskQueue from "taskqueue.js";

const taskQueue = new TaskQueue();

You can then add tasks to the queue:

taskQueue.push(() => console.log("Task1");
taskQueue.push(() => console.log("Task2");

// Add a task with arguments
taskQueue.push((arg1:string, arg2:string) => console.log(arg1,arg2), arg1, arg2);

You can run the tasks in sequence using the run() method:

await taskQueue.run()

TaskQueue.js also handles errors and automatic task repetition in case of failure.

Contribute

Contributions to TaskQueue.js are welcome! To contribute, please fork this repository, make your changes and submit a pull request.

cp .vscode/settings.example.json .vscode/settings.json
npm i

License

TaskQueue.js is licensed under the MIT license. See the LICENSE file for more details.

Contact

Created by Jivaros GBETO - Twitter | LinkedIn | jivarosgbeto@gmail.com - feel free to contact me!