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

organisationSourcefunction

Where 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. The European Union's flag is drawn for this package, not a file, so it has none.

Import it

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

Definition

function organisationSource(id: string): { file: string; page: string; licence: string; author: string; } | null

Parameters

NameTypeDescription
idstring

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

Returns

{ file: string; page: string; licence: string; author: string; } | null

{ file, page, licence, author }, or null for the European Union's drawing and for an id with no flag here.

Examples

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

console.log(organisationSource("org:caricom")?.licence); // "Public domain"
console.log(organisationSource("org:eu"));               // null
Public domain
null

What it prints (run when this page was built)

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