execution-queue
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

Project logo

execution-queue

Status GitHub Issues GitHub Pull Requests License


A javascript/typescript queue that runs functions sequentially.
When you add one function it will be pushed to the queue and run.
If you add more functions they will be pushed to the queue and they will be run, one by one.
Only one function is executed at time.

📝 Table of Contents

🧐 About

Executes a queue of functions one by one

🏁 Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

  • NodeJs

Installing

Using npm:

  • npm install execution-queue

Using yarn:

  • yarn add execution-queue

🔧 Running the tests

Test are jest based, so

  • path_to_jest --config jest.config.js i.e.
  • ./node_modules/.bin/jest --config jest.config.js

🎈 Usage

const { ExecutionQueue } = require("execution-queue");
const executionQueue = new ExecutionQueue();


executionQueue.push(() => {
    console.log("Hello world!");
});
executionQueue.push(() => {
    console.log("Hello world 2!");
});

⛏️ Built Using

✍️ Authors

Readme

Keywords

none

Package Sidebar

Install

npm i execution-queue

Weekly Downloads

6

Version

1.0.1

License

GPL V3

Unpacked Size

58.9 kB

Total Files

13

Last publish

Collaborators

  • fbrisa