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 · Medieval banners

isMedievalIdfunction

True for an id of this set, written exactly as this package writes it. A country's code ("JP") is not one.

Import it

import { isMedievalId } from "@johnmorrisdotca/hata/medieval";

Definition

function isMedievalId(value: unknown): value is MedievalId

Parameters

NameTypeDescription
valueunknown

Anything.

Returns

boolean

true when value is a string in MEDIEVAL_IDS, and false for anything else, never throwing.

Examples

import { isMedievalId } from "@johnmorrisdotca/hata/medieval";

console.log(isMedievalId("med:aragon-pallets")); // true
console.log(isMedievalId("US"));               // false
true
false

What it prints (run when this page was built)

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