本文へ移動

Hata旗

国や地域の旗を読み込み、対応する表示の形を選び、絵ごとの資料・作者・ライセンスを保てます。

「旗(はた)」は、旗を表す日本語です。 名前について(英語)

目次

リファレンス · 旗の資料と表示の情報

Restricted型

リファレンスの説明と例は英語です。見出しと目次は日本語です。

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 type { Restricted } from "@johnmorrisdotca/hata/manifest";

定義

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

メンバー

名前型説明
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.

例

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' ]

出力(このページを作ったときに実行した結果)

ソースを見るGitHub で編集@johnmorrisdotca/hata 1.31.0 のソースから作成しました。

この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。