Event Sourced
An Event Sourcing library for Node using ES6, Immutable, NLP and some CQRS.
Work in progress. For now, see lib/entity/entity.spec.js to get an idea of what it does.
With this small library I'm aiming to provide an easy way to implement event sourced entities in Node. My goal is to be able to do something like this:
class MyEntity extends Entity {
save() {}
delete() {}
}
const events = [
{ event: 'saved', patch: { op: "save", path: "/name", value: "Luis" } },
];
const instance = new MyEntity(events);
assert(instance.name === "Luis");
instance.nickname = "luisgo";
const instance.save();
const instance.delete();