commandex

1.0.6 • Public • Published

CommandEx

An implementation of a Event/Command Queue.

Usage

Create a new queue.

let commandex =  require("commandex")
let queue = new commandex.CommandQueue();

Create a new command.

class MyCommand extends commandex.Command {
    execeute(context){
        // do stuff
    }
}

Publish the command onto the queue.

queue.publish(new MyCommand())
    .then( function(commandReturnedValue) {} )

Service the command queue items.

queue.execute()

Readme

Keywords

none

Package Sidebar

Install

npm i commandex

Weekly Downloads

9

Version

1.0.6

License

ISC

Unpacked Size

7.92 kB

Total Files

6

Last publish

Collaborators

  • fredriquesamuels