Javascript porting of joliver EventStore https://github.com/joliver/EventStore