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