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

NoFlagtype

Why a day has no drawing to give, or none at all: the kind and a sentence. restricted: the law restricts the flag of that day and it is withheld (the reason is the flag's own, in variant.restricted); not-yet: before the first flag the package dates for the place; ended: after a former country's last year; gap: between two dated flags, a flag the package does not ship; other-role: the day has a flag in the other role only; undated: the place has no dated flags (ask without a date); unknown: not a code with a flag here.

Import it

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

Definition

interface NoFlag {
    kind: "restricted" | "not-yet" | "ended" | "gap" | "other-role" | "undated" | "unknown";
    reason: string;
}

Members

NameTypeDescription
kind"restricted" | "not-yet" | "ended" | "gap" | "other-role" | "undated" | "unknown"
reasonstring

Examples

import { flagOn, type NoFlag } from "@johnmorrisdotca/hata/manifest";

const none: NoFlag | null = flagOn("SUHH", "1992-01-01").none;
console.log(none?.kind);   // "ended"
console.log(none?.reason); // "It had ended by 1992-01-01 (its years are 1922 to 1991)."
ended
It had ended by 1992-01-01 (its years are 1922 to 1991).

What it prints (run when this page was built)

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