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 · Flag source and framing metadata

LeftOutRecordtype

A code Kuni knows that has no flag in this version, and why.

Import it

import type { LeftOutRecord } from "@johnmorrisdotca/hata/manifest";

Definition

interface LeftOutRecord {
    code: string;
    kind: "no-flag" | "not-svg" | "licence";
    reason: string;
    file: string | null;
    page: string | null;
    licence: string | null;
    disputed: boolean;
    defaultVariant: string | null;
    variants: Variant[];
}

Members

NameTypeDescription
codestring

The code, as Kuni writes it.

kind"no-flag" | "not-svg" | "licence"

Why: no-flag (no source names one), not-svg (the source's file is not an SVG) or licence (not public domain, CC0 or CC BY).

reasonstring

The reason in a sentence.

filestring | null

The Commons file that was not shipped, where there is one; null otherwise.

pagestring | null

That file's page on Commons; null where there is no file.

licencestring | null

The licence Commons gives the file, where it was the reason; null otherwise.

disputedboolean

True where the place's flag is claimed by more than one authority or community (Northern Ireland).

defaultVariantstring | null

The id of the variant a place with no flag of its own gives by default: always null here, since a code in this list has no default flag.

variantsVariant[]

The flags in real use at a place with none of its own (Northern Ireland: the Union Flag, the former Ulster Banner), each asked for by name; empty for the rest.

Examples

import { leftOut, type LeftOutRecord } from "@johnmorrisdotca/hata/manifest";

const sahara: LeftOutRecord | null = leftOut("EH");
console.log(sahara?.reason);
Western Sahara has no flag of its own on Wikidata. The flag often shown for it is the Sahrawi Arab Democratic Republic's, one claimant's; it is left out rather than chosen for the territory (see docs/decisions.md).

What it prints (run when this page was built)

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