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

customIdfunction

A custom flag's id, from one written loosely (either case, spaces around it) and registered: "custom:harbour-fc". The custom: may not be left off, so a bare code is never read as one.

Import it

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

Definition

function customId(input: string): string | null

Parameters

NameTypeDescription
inputstring

An id, in any case.

Returns

string | null

The id as registered, or null when it is none or is not registered (or its set is off).

Examples

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

console.log(customId(" CUSTOM:Nothing-here ")); // null: nothing registered
null

What it prints (run when this page was built)

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