Skip to the content

Jarajaraジャラジャラ

Draw mahjong tiles, arrange racks and stacked boards, and play seeded Awase alone or at a shared table.

Jarajara is the Japanese sound of mahjong tiles rattling together. About the name

Contents

Reference · Tiles, layouts and deals

hashTextfunction

A 32-bit FNV-1a hash of a string: the seed a shuffle is drawn from, so the same tiles shuffled the same time come out the same.

Import it

import { hashText } from "@johnmorrisdotca/jarajara";

Definition

function hashText(text: string): number

Parameters

NameTypeDescription
textstring

The unknown text or encoded record to interpret.

Returns

number

A 32-bit FNV-1a hash of a string: the seed a shuffle is drawn from, so the same tiles shuffled the same time come out the same.

Examples

import { hashText } from "@johnmorrisdotca/jarajara";

console.log(hashText("room-7"));
3162819430

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/jarajara 1.7.0.