TinyBase logoTinyBase β

getCellInRowHash

The getCellInRowHash function returns a hash for a single Cell in a Row, based on its Id and hash (in turn produced from its value).

getCellInRowHash(
  cellId: string,
  cellHash: number,
): Hash
TypeDescription
cellIdstring

The Id of the Cell.

cellHashnumber

The hash of the Cell.

returnsHash

A hash of the Cell based on its content and Id.

Example

This example gets the hash of a Cell and its Id.

import {getCellInRowHash} from 'tinybase';

const cellId = 'species';
const cellHash = '3002200796'; // hash of 'dog' and '03E3B------mmxrx'

console.log(getCellInRowHash(cellId, cellHash));
// -> 3777304796

Since

v6.2.0