TinyBase logoTinyBase

getStore

The getStore method returns a reference to the underlying Store that is backing this Checkpoints object.

getStore(): Store
returnsStore

A reference to the Store.

Example

This example creates a Checkpoints object against a newly-created Store and then gets its reference in order to update its data and set a checkpoint.

const checkpoints = createCheckpoints(createStore());
checkpoints.getStore().setCell('pets', 'fido', 'species', 'dog');
checkpoints.addCheckpoint();
console.log(checkpoints.getCheckpointIds());
// -> [['0'], '1', []]