本文へ移動

Hata旗

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

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

目次

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

TagName型

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

The names a flag's tag can have: a closed list of the things a person sees on a flag. plain is flat fields of colour with nothing drawn on them; emblem is any seal, badge, shield or device, a coat of arms included; a Nordic cross is a cross too. docs/tags.md says when each applies.

インポート

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

ほかのエクスポート元: @johnmorrisdotca/hata/search

定義

type TagName = "plain" | "stripes-horizontal" | "stripes-vertical" | "stripes-diagonal" | "cross" | "nordic-cross" | "saltire" | "canton" | "stars" | "crescent" | "sun" | "circle" | "triangle" | "emblem" | "coat-of-arms" | "animal" | "plant" | "building" | "weapon" | "crown" | "map" | "text";

例

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

const names: TagName[] = (manifest("DE")?.tags ?? []).map((one) => one.tag);
console.log(names); // ["plain", "stripes-horizontal"]
[ 'plain', 'stripes-horizontal' ]

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

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

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