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
| Name | Type | Description |
|---|---|---|
reason | string | Why it is restricted, in a sentence a page can show beside it, in English. |
reasonJa | string | The same in Japanese. |
law | string[] | The laws that restrict it: "DE StGB §86a" and "AT Verbotsgesetz". |
allowedFor | string | What it may be used for under those laws' exceptions (StGB §86(4) in Germany): "education and history". Not commerce. |
allowedForJa | string | 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)