Socket
Book a DemoInstallSign in
Socket

hebo

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hebo

Simple CQRS / Event Sourcing Container

latest
Source
npmnpm
Version
7.1.0
Version published
Maintainers
1
Created
Source

hebo

build status code coverage code style styled with prettier made with lass license

Simple CQRS / Event Sourcing Container

Table of Contents

Install

npm:

npm install hebo

yarn:

yarn add hebo

Usage

// Meant to be done at require time
const Hebo = require('hebo');
const libraryAggregate = require('./path/to/my/libraryAggregate');
const bookAggregate = require('./path/to/my/bookAggregate');

const hebo = new Hebo({
    aggregates: {
      library: libraryAggregate,
      book: bookAggregate,
    }
})

// ... and then do this at runtime:
const { getProjection, runCommand, updateSnapshot } = hebo.connect({
    eventRepository,
    snapshotRepository,
    notificationHandler,
    authorizer,
    user,
});

await runCommand('createLibrary', 1234);
await runCommand('setLibraryName', 1234, 'North Branch');

const library = getProjection('library', 1234);

await updateSnapshot('library', 1234);

Contributors

Name
Steve Caldwell

License

MIT © Steve Caldwell

Keywords

cqrs

FAQs

Package last updated on 09 Feb 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.