Reference · Flags a page registers itself
customNamefunction
A custom flag's name, in English or Japanese (any tag that starts ja); the English where no Japanese was given.
Import it
import { customName } from "@johnmorrisdotca/hata/custom";
Definition
function customName(id: string, lang?: string): string | null
Parameters
| Name | Type | Description |
|---|---|---|
id | string | The flag's id, in any case. |
lang (optional) | string |
|
Returns
string | null
The name, or null when no such flag is registered.
Examples
import { customName } from "@johnmorrisdotca/hata/custom";
console.log(customName("custom:nothing-here", "ja")); // nullnullWhat it prints (run when this page was built)