aristeides

1.0.0-alpha.2 • Public • Published

Aristeides

Simple command bus pattern implementation for NodeJS.

How it works

Register command handlers using the registerCommand function, de-register them using the deregisterCommand function.

As a convention, all command names must follow the CONSTANT_CASE pattern, or registration will throw an error.

Execute commands by using the handle function, which returns a Promise that either resolves with the command's outcome or throws an Error.

You can fire-and-forget commands by not waiting on the outcome of the handle function.

Interceptors, which are functions that are run before the handling of the command, can also be registered and de-registered using the registerInterceptor and deregisterInterceptor functions.

/aristeides/

    Package Sidebar

    Install

    npm i aristeides

    Weekly Downloads

    0

    Version

    1.0.0-alpha.2

    License

    MIT

    Unpacked Size

    9.28 kB

    Total Files

    12

    Last publish

    Collaborators

    • dbhsiuaj