Options
All
  • Public
  • Public/Protected
  • All
Menu

@nextcloud/event-bus - v1.0.1

@nextcloud/event-bus

Build Status npm

A event bus to communicate between Nextcloud components

Installation

npm i -S @nextcloud/event-bus

Usage

import { subscribe, unsubscribe, emit } from '@nextcloud/event-bus'

const h = e => console.info(e)

subscribe('a', h)
subscribe('b', h)

emit('a', {
    data: 123,
})

unsubscribe('a', h)
unsubscribe('b', h)

Generated using TypeDoc