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

FlagCodetype

A code with a flag, as Kuni writes it: "JP", "JP-13", "CA-ON", "US-TX".

Import it

import type { FlagCode } from "@johnmorrisdotca/hata";

Definition

type FlagCode = (typeof FLAG_CODES)[number];

Examples

import { flagCode, type FlagCode } from "@johnmorrisdotca/hata";

const home: FlagCode | null = flagCode("jp-13"); // "JP-13"
console.log(home);
JP-13

What it prints (run when this page was built)

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