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

OtherFlagtype

The other flag of a day, in the role that was not asked for.

Import it

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

Definition

interface OtherFlag {
    role: FlagRole;
    id: string;
    name: string;
    nameJa: string;
    note: RoleNote | null;
}

Members

NameTypeDescription
roleFlagRole

The role it has: in-use where the legal flag was asked for, and legal where the flag in use was.

idstring

Its id: ask for it with variantOn(code, date, { role }) or flag(code, { variant: id }).

namestring

Its name in English.

nameJastring

The same in Japanese.

noteRoleNote | null

The reason one was the law's and the other the practice, as its roleNote says; null where the package gives none.

Examples

import { variantOn, type OtherFlag } from "@johnmorrisdotca/hata/manifest";

const other: OtherFlag | null = variantOn("AU", "1930")?.other ?? null;
console.log(other?.id, other?.role); // "australian-national-flag" "in-use": the flag flown while the Union Flag was the legal one
australian-national-flag in-use

What it prints (run when this page was built)

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