@tadashi/ee
v1.1.0
Published
EventEmitter Singleton
Downloads
26
Readme
@tadashi/ee
EventEmitter Singleton
Install
$ npm i @tadashi/ee
Usage
// log.js
import ee from '@tadashi/ee'
function _log(data) {
console.log(data)
}
ee.on('logger', _log)
// ---
// app.js
import ee from '@tadashi/ee'
ee.emit('logger', {
message: 'apenas um show',
})
Donate ❤️
- BTC: bc1q7famhuj5f25n6qvlm3sssnymk2qpxrfwpyq7g4
License
MIT © Thiago Lagden