TinyBase logoTinyBase β

getTableHash

The getTableHash function returns a hash for a single Table in a Store, based on each Row Id and hash.

getTableHash(rowHashes: {[rowId: Id]: Hash}): Hash
TypeDescription
rowHashes{[rowId: Id]: Hash}

An object containing each Row Id and its hash.

returnsHash

A hash of the Table.

Example

This example gets the hash of a Table.

import {getTableHash} from 'tinybase';

const rowHashes = {
  fido: 1810444343, // hash of its contents
};

console.log(getTableHash(rowHashes));
// -> 4262151841

Since

v6.2.0