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

import { … } from "@johnmorrisdotca/hata/organisations";

21.7 kB minified and gzipped, with everything it imports (measured with esbuild)

Exports

NameKindWhat it is
isOrganisationIdfunctionTrue for one of the ids with a flag here, written exactly as this package writes it: "org:eu".
loadOrganisationFlagfunctionAny organisation's flag as an SVG string, loaded when it is asked for: each drawing is a module of its own (@johnmorrisdotca/hata/organisations/<slug>), so a page carries the drawings it asks for and no others.
ORGANISATION_IDSconstantEvery organisation id with a flag, in the order of the table.
organisationAspectfunctionAn organisation's flag's width over its height, from its viewBox: 1.5 for the European Union's 3:2.
organisationFlagfunctionAn organisation's flag as an SVG string, the same kind of string a country's module holds: it has a viewBox and no width or height.
organisationIdfunctionThe id of an organisation's flag, from an id written loosely: either case, with spaces around it.
OrganisationIdtypeThe id of an organisation's flag, written exactly as this package writes it: org: and a lower-case slug.
organisationNamefunctionAn organisation's name, in English or Japanese: what a screen reader should say for the flag, or a caption.
organisationSourcefunctionWhere a drawing taken from Wikimedia Commons comes from: its file, its page, its licence as Commons states it (public domain or CC0, never share-alike) and its author as Commons gives it.
organisationTermsfunctionWhere the terms for an organisation's flag were read: the page, the day, and what they say.

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