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