Version-controlled storage in Javascript