Skip to the content

Hata旗

Load a native country or region flag, choose supported framing and keep each drawing’s source, author and licence.

Hata (旗) is Japanese for a flag. About the name

Contents

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

NameTypeDescription
idstring

An organisation's id, in any case, with or without org:.

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")); // null
1.5
null

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/hata 1.31.0.