@muspellheim/shared
    Preparing search index...

    Class EventBus

    A simple in-memory event bus.

    Index

    Constructors

    • Creates an event bus with options.

      Parameters

      • options: { cacheSize?: number; log?: Log } = {}
        • OptionalcacheSize?: number

          Number of cached last events.

        • Optionallog?: Log

          Logger, default is the console.

      Returns EventBus

    Methods

    • Return the cached events.

      Returns Readonly<{ data: unknown; type: string }>[]