A purely functional implementation of interval tree clocks. Can be used to keep track of causal information in distributed systems. Works in the browser and in nodejs.
Installation:
npm install com.izaakschroeder.interval-tree-clock
Usage:
var seedStamp = require('com.izaakschroeder.interval-tree-clock');
var
tmp = undefined,
user1 = seedStamp,
user2 = seedStamp;
tmp = user1.send();
user1 = tmp[0];
user2.receive(tmp[1]);
Merge two stamps.
Split a stamp.
Special case of fork.
Trigger an event.
Receive a message.
Send a message.