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

enableFlagsfunction

Switches a registered set off or on without forgetting it: while off, its flags are not found, listed or credited.

Import it

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

Definition

function enableFlags(sourceId: string, on?: boolean): boolean

Parameters

NameTypeDescription
sourceIdstring

The set's id.

on (optional)boolean

true to show it (the default), false to hide it.

Returns

boolean

true when there was such a set.

Examples

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

console.log(enableFlags("no-such-set", false)); // false
false

What it prints (run when this page was built)

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