| var dat = ... | |
| var dataset = dat.dataset('great-data') | |
| // add some data | |
| dataset.put('hello', 'world') | |
| dataset.batch([{ | |
| type: 'put', | |
| key: 'more', | |
| value: 'data' | |
| }, { | |
| ... | |
| }]) | |
| // will insert a node in the graph pointing to the current head with this message | |
| dat.checkpoint('I did some stuff and things should work now') | |
| dat.createCheckpointStream() | |
| .on('data', function (data) { | |
| console.log(data) // {message: 'I did some stuff and things should work now', head: 'deadbeaf'} | |
| }) | |
| var checkout = dat.checkout('deadbeaf') // checkouts the above "checkpoint" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment