Reference · Flags of international organisations
organisationAspectfunction
An organisation's flag's width over its height, from its viewBox: 1.5 for the European Union's 3:2. For keeping a box before the picture is drawn.
Import it
import { organisationAspect } from "@johnmorrisdotca/hata/organisations";
Definition
function organisationAspect(id: string): number | null
Parameters
| Name | Type | Description |
|---|---|---|
id | string | An organisation's id, in any case, with or without |
Returns
number | null
The aspect ratio, or null when the id has no flag here.
Examples
import { organisationAspect } from "@johnmorrisdotca/hata/organisations";
console.log(organisationAspect("org:eu")); // 1.5
console.log(organisationAspect("org:xx")); // null1.5
nullWhat it prints (run when this page was built)