Postman is a JavaScript library & npm package which allows for cross-component messaging like traditional pub/ sub libraries but without the reqiurement on a message to be published after all the listeners are attached.
Could someone please explain me what's the point of this? I can't imagine any serious use case.<p>It looks inefficient (uses arrays instead of linked lists/queues, so every cleanup requires full array rebuild), lacks any sort of message ordering guarantees (or notifications of lack thereof), lacks queue length limits (only time-based expiry and custom cleanup functions seeing only the value of message are provided) and so on.<p>Moreover, I don't get the following:<p><pre><code> dropByDate = (date, msgs) ->
msgs.reduce (x) ->
x.created < date
</code></pre>
I believe msgs is an array (cache[name].history), but IIRC Array.reduce does not work like this, it's Array.filter that does.