3 ms·
I wrote this because the application I'm working on has dozens of small JavaScript components loaded, some of which rely on messages published by others. Some o
by slace 15y ago
I wrote this because the application I'm working on has dozens of small JavaScript components loaded, some of which rely on messages published by others. Some of them are invoked in-place, others are invoked as part of dom ready events so ensuring that the handlers are added before the messages are raised can't be done. Message ordering isn't important and since it's intended for asynchronous programming it shouldn't be important.
As for linked lists vs arrays I'm not convinced that a linked list would be a better performer than an array for iterative access (which is a rather crucial part of the library).
The reduce thing is a bug (I've chucked it on the issue register) as well as a feature request for only keeping a finite message limit.