Reference · Ship signal flags (International Code of Signals)
signalNamefunction
A flag's name, in English or Japanese: the letter and its word ("A: Alfa", "A旗(アルファ)"), the figure and its word, a substitute or
the answering pennant. Any language tag that starts with ja is Japanese.
Import it
import { signalName } from "@johnmorrisdotca/hata/signals";
Definition
function signalName(id: string, lang?: string): string | null
Parameters
| Name | Type | Description |
|---|---|---|
id | string | A flag's id, in any case, with or without |
lang (optional) | string |
|
Returns
string | null
The name, or null when the Code has no such flag.
Examples
import { signalName } from "@johnmorrisdotca/hata/signals";
console.log(signalName("ics:a")); // "A: Alfa"
console.log(signalName("ics:a", "ja")); // "A旗(アルファ)"A: Alfa
A旗(アルファ)What it prints (run when this page was built)