@exodus/module
v1.3.1
Published
Exodus base module class
Downloads
12,755
Readme
Exodus Module
Exodus base module implementation.
Summary
We want to write new code as modules whenever feasible. This will allow us to more easily share the code between platforms and make development easier in general.
This package exports an ExodusModule
class reusable modules can extend from, with shared event handling data and logging capabilities.
Install
yarn add @exodus/module
Usage
import ExodusModule from '@exodus/module'
class ContactsModule extends ExodusModule {
constructor() {
super({ name: 'ContactsModule' })
}
load = async () => {
this._logger.log('loading contacts')
// do stuff...
this.emit('contacts-loaded', {})
}
}