Reference · Ship signal flags (International Code of Signals)
signalMeaningfunction
What the flag means, as the Code gives it for a letter, or what it does for a figure, a substitute or the answering pennant, in English or Japanese. The English of a letter is the Code's own words (Pub. 102, "Single letter signals").
Import it
import { signalMeaning } from "@johnmorrisdotca/hata/signals";
Definition
function signalMeaning(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 meaning, or null when the Code has no such flag.
Examples
import { signalMeaning } from "@johnmorrisdotca/hata/signals";
console.log(signalMeaning("ics:a")); // "I have a diver down; keep well clear at slow speed."
console.log(signalMeaning("ics:a", "ja")); // "ダイバーが潜水中です。十分に離れ、低速で航行してください。"I have a diver down; keep well clear at slow speed.
ダイバーが潜水中です。十分に離れ、低速で航行してください。What it prints (run when this page was built)