A simplified implementation to learn how to build our own pubsub (publisher-subscriber pattern).
How do I learn?
The purpose of the project to explain how most of the event emitters (pubsub) works. source code: build-pubsub
Want to try
$ npm install build-pubsub
how to use
const Pubsub = ;const pubsub = ;pubsub;pubsub;pubsub; // fires both ajaxFunc & ajaxAnotherFunc with args
Some of the useful links to learn pubsub.
- Publisher subscriber pattern
- Observer vs pubsub pattern
- Enterprise integeration patterns
- What is pubsub
It didn't make sense, let me know how it can be improved by creating issue or PR.
npm run test