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

manifestfunction

Where one flag's drawing comes from, its licence and author, and why it was chosen.

Import it

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

Definition

function manifest(code: string): FlagRecord | null

Parameters

NameTypeDescription
codestring

A flag's code in any case: "JP", "jp-13", "CA_ON".

Returns

FlagRecord | null

The flag's record, or null when the code has no flag here (see leftOut for why).

Examples

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

console.log(manifest("JP-13")?.licence.name); // "Public domain"
console.log(manifest("YE")?.source);           // "country-flag-icons"
console.log(manifest("XX"));                   // null
Public domain
country-flag-icons
null

What it prints (run when this page was built)

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