hasCheckpoint
The hasCheckpoint
method returns a boolean indicating whether a given Checkpoint exists in the Checkpoints
object.
hasCheckpoint(checkpointId: Id): boolean
Type | Description | |
---|---|---|
checkpointId | Id | The |
returns | boolean | Whether a Checkpoint with that |
Example
This example shows two simple Checkpoint existence checks.
const store = createStore().setTables({pets: {fido: {sold: false}}});
const checkpoints = createCheckpoints(store);
console.log(checkpoints.hasCheckpoint('0'));
// -> true
console.log(checkpoints.hasCheckpoint('1'));
// -> false