Lightweight library with aggregate functions for composing asynchronous and event-based operations in JavaScript