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 · Codes, URLs and SVG helpers

FLAG_ALIASESconstant

The other codes a former country is known by in tables of sport and of old ISO 3166 lists, each with the code of the place it finds: "SU", "SUN" and "URS" for the Soviet Union (SUHH), "DD", "DDR" and "GDR" for East Germany (DDDE), "TCH" for Czechoslovakia (CSHH), "YUG" for Yugoslavia (YUCS). flagCode, flag, flagName, manifest and the element read them; none is a code of a flag itself (isFlagCode("URS") is false). "CS" is in neither list on purpose: ISO 3166-1 gave it to Czechoslovakia and, later, to Serbia and Montenegro, so it finds nothing, and /manifest's leftOut("CS") says why.

Import it

import { FLAG_ALIASES } from "@johnmorrisdotca/hata";

Definition

const FLAG_ALIASES: Readonly<Record<string, string>> = {
    "AFI": "AIDJ",
    "AHO": "ANHH",
    "AN": "ANHH",
    "ANT": "ANHH",
    "ATN": "NQAQ",
    "BIR": "BUMM",
    "BU": "BUMM",
    "BUR": "BUMM",
    "BWI": "WIF",
    "CSK": "CSHH",
    "CT": "CTKI",
    "CTE": "CTKI",
    "DD": "DDDE",
    "DDR": "DDDE",
    "DHY": "DYBJ",
    "DY": "DYBJ",
    "FQ": "FQHH",
    "GDR": "DDDE",
    "GEL": "GEHH",
    "HV": "HVBF",
    "HVO": "HVBF",
    "JT": "JTUM",
    "JTN": "JTUM",
    "MI": "MIUM",
    "MID": "MIUM",
    "NH": "NHVU",
    "NHB": "NHVU",
    "NQ": "NQAQ",
    "NT": "NTHH",
    "NTZ": "NTHH",
    "PC": "PCHH",
    "PCI": "PCHH",
    "PCZ": "PZPA",
    "PU": "PUUM",
    "PUS": "PUUM",
    "PZ": "PZPA",
    "RH": "RHZW",
    "RHO": "RHZW",
    "ROT": "EOR",
    "SCG": "CSXX",
    "SU": "SUHH",
    "SUN": "SUHH",
    "TCH": "CSHH",
    "TMP": "TPTL",
    "TP": "TPTL",
    "URS": "SUHH",
    "VD": "VDVN",
    "VDR": "VDVN",
    "WAK": "WKUM",
    "WK": "WKUM",
    "YD": "YDYE",
    "YMD": "YDYE",
    "YU": "YUCS",
    "YUG": "YUCS",
    "ZAI": "ZRCD",
    "ZAR": "ZRCD",
    "ZR": "ZRCD",
}

Examples

import { FLAG_ALIASES } from "@johnmorrisdotca/hata";

console.log(FLAG_ALIASES.URS); // "SUHH"
console.log(FLAG_ALIASES.GDR); // "DDDE"
SUHH
DDDE

What it prints (run when this page was built)

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