hasCell
The hasCell
method returns a boolean indicating whether a given Cell
exists in a given Row
in a given Table
.
hasCell(
tableId: Id,
rowId: Id,
cellId: Id,
): boolean
Type | Description | |
---|---|---|
tableId | Id | |
rowId | Id | |
cellId | Id | |
returns | boolean | Whether a |
Example
This example shows two simple Cell
existence checks.
const store = createStore().setTables({pets: {fido: {species: 'dog'}}});
console.log(store.hasCell('pets', 'fido', 'species'));
// -> true
console.log(store.hasCell('pets', 'fido', 'color'));
// -> false