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

FlagSourcetype

Where a drawing comes from: Wikimedia Commons (the file Wikidata names as the place's flag), or one of the MIT flag sets, chosen where it draws the same flag at its true proportions and is smaller, or is free where Commons' file is not.

Import it

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

Definition

type FlagSource = "commons" | "flag-icons" | "country-flag-icons";

Examples

import { MANIFEST, type FlagSource } from "@johnmorrisdotca/hata/manifest";

const fromSets: FlagSource[] = ["flag-icons", "country-flag-icons"];
console.log(MANIFEST.filter((one) => fromSets.includes(one.source)).map((one) => one.code)); // ["YE"]
[ 'YE' ]

What it prints (run when this page was built)

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