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 · Flag source and framing metadata

Restrictedtype

A flag whose display the law restricts. Germany's national flag of 1935 to 1945 is the one: it is shipped for history and education, and is never returned by a default lookup, a list, a picker, a quiz, a download pack or the CDN listing. Ask for it by name with allowRestricted: true (flag, variantOn, variantsOf) or the allow-restricted attribute of <hata-flag>, for a purpose in allowedFor.

Import it

import type { Restricted } from "@johnmorrisdotca/hata/manifest";

Definition

interface Restricted {
    reason: string;
    reasonJa: string;
    law: string[];
    allowedFor: string;
    allowedForJa: string;
}

Members

NameTypeDescription
reasonstring

Why it is restricted, in a sentence a page can show beside it, in English.

reasonJastring

The same in Japanese.

lawstring[]

The laws that restrict it: "DE StGB §86a" and "AT Verbotsgesetz".

allowedForstring

What it may be used for under those laws' exceptions (StGB §86(4) in Germany): "education and history". Not commerce.

allowedForJastring

The same in Japanese.

Examples

import { variantOn, type Restricted } from "@johnmorrisdotca/hata/manifest";

const found = variantOn("DE", "1940");
const why: Restricted | null = found?.restricted ?? null;
console.log(found?.withheld); // true: the drawing is not given without allowRestricted
console.log(why?.law);        // ["DE StGB §86a", "AT Verbotsgesetz"]
true
[ 'DE StGB §86a', 'AT Verbotsgesetz' ]

What it prints (run when this page was built)

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