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 · Military flags (naval ensigns, jacks and war flags)

militaryIdfunction

The id of a flag from an id written loosely: either case, with spaces around it, with or without mil:.

Import it

import { militaryId } from "@johnmorrisdotca/hata/military";

Definition

function militaryId(input: string): MilitaryId | null

Parameters

NameTypeDescription
inputstring

"gb-white-ensign", " MIL:GB-White-Ensign ".

Returns

MilitaryRecordId | null

The id as this package writes it, or null when the set has no such flag.

Examples

import { militaryId } from "@johnmorrisdotca/hata/military";

console.log(militaryId(" GB-White-Ensign ")); // "mil:gb-white-ensign"
console.log(militaryId("nobody"));            // null
mil:gb-white-ensign
null

What it prints (run when this page was built)

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