TinyBase logoTinyBase β

getTablesHash

The getTablesHash function returns a hash for the tabular part of a Store, based on each Table Id and hash.

getTablesHash(tableHashes: {[tableId: Id]: Hash}): Hash
TypeDescription
tableHashes{[tableId: Id]: Hash}

An object containing each Table Id and its hash.

returnsHash

A hash of the Tables.

Example

This example gets the hash of the tabular part of a Store.

import {getTablesHash} from 'tinybase';

const tableHashes = {
  pets: 4262151841, // hash of its contents
};

console.log(getTablesHash(tableHashes));
// -> 278115833

Since

v6.2.0