
Show HN: Msngr.js a simple messaging library that works in the server or browser - BinaryIdiot
https://github.com/KrisSiegel/msngr.js
======
BinaryIdiot
Hi all! I originally submitted msngr.js almost two years ago[1] and since then
it's consistently improved. Now that I'm at the point where I feel comfortable
that APIs are unlikely to change any further (at least not in the next few
years) I was hoping to get a renewed take on it. Thoughts, criticisms, likes,
dislikes etc would be extremely helpful!

I constantly find myself using msngr to handle events that multiple components
might want to access without needing direct access to the object (so for
instance I like broadcasting a message when the user's information is updated
then all components that display some piece of user information can update
without caring where it came from). I also use it for logging and even
configuration management (it has a cache that can merge objects together which
is handy when applying multiple environment files).

But I live in a bubble using it. I only know a few others using it and they
typically don't give me feedback so I'd like to hear anyone's thoughts
regardless of the direction :). The documentation is mostly complete but there
are a few undocumented items I will get to eventually (for instance you can
respond to a message either synchronously or asynchronously and it'll
aggregate all responses to a specific message and return it to the original
emitter).

[1]
[https://news.ycombinator.com/item?id=9031854](https://news.ycombinator.com/item?id=9031854)

