TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Postman - a JavaScript message bus

20 pointsby slacealmost 14 years ago
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.

2 comments

drdaemanalmost 14 years ago
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) -&#62; msgs.reduce (x) -&#62; x.created &#60; 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.
评论 #2783627 未加载
oinksoftalmost 14 years ago
No, it's a CoffeeScript message bus.
评论 #2779744 未加载