Reference · Marking, scores and game rules
kanaFamilyfunction
The gojūon row a kana belongs to, by its base, or null for ー and anything that is no kana.
Import it
import { kanaFamily } from "@johnmorrisdotca/kotoba";
Definition
function kanaFamily(kana: string): number | null
Parameters
| Name | Type | Description |
|---|---|---|
kana | string | One kana character, including supported small or voiced forms. |
Returns
number | null
The zero-based gojūon family index, or null for a character with no family.
Examples
import { kanaFamily } from "@johnmorrisdotca/kotoba";
console.log(kanaFamily("が"));1What it prints (run when this page was built)