TinyBase logoTinyBase β

delTable

The delTable method lets you remove a single Table from the Store.

delTable(tableId: string): this
TypeDescription
tableIdstring

The Id of the Table in the Store.

returnsthis

A reference to the Store.

Example

This example removes a Table from a Store.

import {createStore} from 'tinybase';

const store = createStore().setTables({
  pets: {fido: {species: 'dog'}},
  species: {dog: {price: 5}},
});
store.delTable('pets');

console.log(store.getTables());
// -> {species: {dog: {price: 5}}}

Since

v1.0.0