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' ]出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。