Created
January 19, 2022 16:15
-
-
Save GaetanoPiazzolla/ddb05ff53f6bfe5d369c0215954f0502 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const store = createStore().setTables({pets: {fido: {sold: false}}}); | |
const checkpoints = createCheckpoints(store); | |
checkpoints.setSize(200); | |
store.setCell('pets', 'fido', 'sold', true); | |
checkpoints.addCheckpoint('sale'); | |
console.log(store.getCell('pets', 'fido', 'sold')); | |
// -> true | |
checkpoints.goBackward(); | |
console.log(store.getCell('pets', 'fido', 'sold')); | |
// -> false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment