micro-queue

    1.0.7 • Public • Published

    Micro Queue

    A micro library built to process tasks synchronously

    npm greenkeeper travis

    Module description

    This module aims to provide a basic, minimalist approach to synchronous queue management. Simply invoke the module directly with a function as it's first and only argument, and that function will be called as soon as possible (with respect to any functions that may already be waiting in the queue).

    Example usage

    Below is a very simple example on how best to use this module. For appearances sake, and to be in keeping with the philosophy of this module, the constant q is chosen, however, if a more expressive or verbose approach is favourable use mQueue instead.

      const q = require('micro-queue');
     
      // Add a function to the queue, like so
      q((done) => {
        // ... do something snazzy
     
        // Then simply call the "done" method upon completion
        done();
      });

    Micro collection

    I've written a few of these micro libraries, check them out!

    Install

    npm i micro-queue

    DownloadsWeekly Downloads

    2

    Version

    1.0.7

    License

    MIT

    Unpacked Size

    4.67 kB

    Total Files

    6

    Last publish

    Collaborators

    • iainreid948