Reference
Ship signal flags (International Code of Signals)
import { … } from "@johnmorrisdotca/hata/signals";
13.6 kB minified and gzipped, with everything it imports (measured with esbuild)
Exports
| Name | Kind | What it is |
|---|---|---|
isSignalId | function | True for an id of this set, written exactly as this package writes it ("ics:a"). |
SIGNAL_IDS | constant | Every id of the set: the Code's 40 flags in the order of its plate (the letters, the numeral pennants, the substitutes, then the answering pennant), then 18 of the special pennants of the United States Navy, usn:code-answer to usn:turn. |
signalAspect | function | A flag's width over its height, from its viewBox: 1.2 for a letter flag, 3.5 for a numeral pennant. |
signalFlag | function | A flag as an SVG string: it has a viewBox and no width or height, a square-ish letter flag, a tapering numeral pennant, a triangular substitute. |
signalId | function | The id of a flag from an id written loosely: either case, with spaces around it, with or without ics:. |
SignalId | type | The id of one of the Code's flags, written exactly as this package writes it: ics: and a lower-case slug. |
signalInfo | function | Everything the package knows of a flag: its group (letter, numeral, substitute or answer), both names, its meaning, its status (official: the design is the Code's own), a note on how it was drawn, the page it was read from and its aspect ratio. |
SignalInfo | type | What the package knows of one flag of the Code: its id, group, both names, meaning, status, note, source and aspect ratio. |
signalMeaning | function | 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. |
signalName | function | 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. |
signalsFor | function | The flags that spell a text, one for each letter or figure and none for anything else (spaces, punctuation, letters outside A to Z): a hoist for a name or a number. |