Reference · Marking, scores and game rules
shiritoriTailKeyfunction
The kana the next word must start on, or null when the word ends the chain: it ends in ん, or holds no kana.
Import it
import { shiritoriTailKey } from "@johnmorrisdotca/kotoba";
Definition
function shiritoriTailKey(reading: string, rules?: ShiritoriRules): string | null
Parameters
| Name | Type | Description |
|---|---|---|
reading | string | The reading of the word just played. |
rules (optional) | ShiritoriRules | House rules; the forgiving ones if left out. |
Returns
string | null
The key the next word's head must equal, or null.
Examples
import { shiritoriTailKey } from "@johnmorrisdotca/kotoba";
console.log(shiritoriTailKey("さくら"), shiritoriTailKey("コーヒー"), shiritoriTailKey("みかん")); // ら い nullら い nullWhat it prints (run when this page was built)