本文へ移動

Hata旗

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

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

目次

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

TagSource型

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

Where a tag comes from, the most trusted first. reviewed: a person looked at the flag and said so. computed: measured from the drawing by a rule with no judgement in it. wikidata: the flag's Wikidata item says it depicts a thing of that kind. unreviewed: an automated guess (a Wikimedia Commons category of the drawing's file, or a rule of thumb on the drawing) that nobody has checked.

インポート

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

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

定義

type TagSource = "reviewed" | "computed" | "wikidata" | "unreviewed";

例

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

const sure: TagSource[] = ["reviewed", "computed"];
console.log((manifest("FR")?.tags ?? []).filter((one) => sure.includes(one.source)).map((one) => one.tag)); // ["plain", "stripes-vertical"]
[ 'plain', 'stripes-vertical' ]

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

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

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