TinyBase logoTinyBase

hasTables

The hasTables method returns a boolean indicating whether any Table objects exist in the Store.

hasTables(): boolean
returnsboolean

Whether any Tables exist.

Example

This example shows simple existence checks.

import {createStore} from 'tinybase';

const store = createStore();
console.log(store.hasTables());
// -> false
store.setTables({pets: {fido: {species: 'dog'}}});
console.log(store.hasTables());
// -> true

Since

v1.0.0