Thanks to visit codestin.com
Credit goes to github.com

Skip to content

📢 A Node.js event emitter with rxjs.

License

Notifications You must be signed in to change notification settings

AkashiGakki/rx-event-emitter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rx-event-emitter

📢 A Node.js event emitter with rxjs.

NPM version

Install

pnpm install rx-event-emitter

Usage

import emitter from 'rx-event-emitter'

emitter.subscribe('shiori', () => console.log('shiori'))
emitter.notify('shiori') // shiori

emitter.once('nagi', () => console.log('nagi'))
emitter.notify('nagi') // nagi
emitter.notify('nagi')

emitter.subscribe('asuka', () => console.log('asuka'))
emitter.notify('asuka') // asuka
emitter.off('asuka')
emitter.notify('asuka')

// alias
emitter.on('nao', () => console.log('nao')) // same as subscribe
emitter.emit('nao') // same as notify expected 'nao'

License

MIT License © 2022 Akashi Sai

About

📢 A Node.js event emitter with rxjs.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published