pvclock

0.0.8 • Public • Published

pvclock

Pruning vector clocks inspired by vectorclock and riak vector clocks.

var pvclock= require('pvclock')({ small: 10, big: 50, young: 20, old: 86400 });
 
var vclock1= {}, vclock2= {};
pvclock.increment(vclock1,'Alice');
pvclock.increment(vclock2,'Alice');
 
pvclock.increment(vclock1,'Ben');
pvclock.increment(vclock1,'Dave');
 
pvclock.increment(vclock2,'Cathy');
 
console.log(pvclock.concurrent(vclock1,vclock2),
            pvclock.merge(vclock1,vclock2))

Package Sidebar

Install

npm i pvclock

Weekly Downloads

1

Version

0.0.8

License

Apache2

Last publish

Collaborators

  • aaaristo