Reference · Ship signal flags (International Code of Signals)
signalAspectfunction
A flag's width over its height, from its viewBox: 1.2 for a letter flag, 3.5 for a numeral pennant. For keeping a box before the picture is drawn.
Import it
import { signalAspect } from "@johnmorrisdotca/hata/signals";
Definition
function signalAspect(id: string): number | null
Parameters
| Name | Type | Description |
|---|---|---|
id | string | A flag's id, in any case, with or without |
Returns
number | null
The aspect ratio, or null when the Code has no such flag.
Examples
import { signalAspect } from "@johnmorrisdotca/hata/signals";
console.log(signalAspect("ics:a")); // 1.2
console.log(signalAspect("ics:0")); // 3.51.2
3.5What it prints (run when this page was built)