https://github.com/alwaysblank/denden
Extremely simple event-based pub/sub system.
https://github.com/alwaysblank/denden
Last synced: about 1 year ago
JSON representation
Extremely simple event-based pub/sub system.
- Host: GitHub
- URL: https://github.com/alwaysblank/denden
- Owner: alwaysblank
- License: mit
- Created: 2025-03-21T15:14:00.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-26T00:52:05.000Z (about 1 year ago)
- Last Synced: 2025-03-26T01:26:38.411Z (about 1 year ago)
- Language: TypeScript
- Size: 63.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Den Den
Extremely simple publish/subscribe system built on events and nothing else.
Designed for the browser, but should work in an JS context that supports events.
## Examples
```javascript
const hub = new Hub();
hub.sub('recipes', (payload) => console.log(payload) );
hub.pub('recipes', 'add eggs');
// "add eggs"
```