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 · Flags a page registers itself

searchCustomFlagsfunction

Finds registered flags by a word: in the id's slug, the names (English and Japanese) and the group, ignoring case; the best first (exact, then a start, then anywhere), then in the order added.

Import it

import { searchCustomFlags } from "@johnmorrisdotca/hata/custom";

Definition

function searchCustomFlags(query: string): CustomFlagInfo[]

Parameters

NameTypeDescription
querystring

The words typed; an empty text finds none.

Returns

CustomFlagInfo[]

The matching flags, as listCustomFlags gives them.

Examples

import { searchCustomFlags } from "@johnmorrisdotca/hata/custom";

console.log(searchCustomFlags("harbour").map((flag) => flag.id));
[]

What it prints (run when this page was built)

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