first version of the event composition library in javascript