TinyBase logoTinyBase β

getCellHash

The getCellHash function returns a hash for a single Cell, based on its value and the HLC of the Cell.

getCellHash(
  cell: CellOrUndefined,
  cellHlc: string,
): Hash
TypeDescription
cellCellOrUndefined

The Cell's value (or undefined).

cellHlcstring

The HLC of the Cell.

returnsHash

A hash of the Cell.

Example

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

import {getCellHash} from 'tinybase';

const cell = 'dog';
const cellHlc = '03E3B------mmxrx';

console.log(getCellHash(cell, cellHlc));
// -> 3002200796

Since

v6.2.0