FlagSource型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
Where a drawing comes from: Wikimedia Commons (the file Wikidata names as the place's flag), or one of the MIT flag sets, chosen where it draws the same flag at its true proportions and is smaller, or is free where Commons' file is not.
インポート
import type { FlagSource } from "@johnmorrisdotca/hata/manifest";
定義
type FlagSource = "commons" | "flag-icons" | "country-flag-icons";
例
import { MANIFEST, type FlagSource } from "@johnmorrisdotca/hata/manifest";
const fromSets: FlagSource[] = ["flag-icons", "country-flag-icons"];
console.log(MANIFEST.filter((one) => fromSets.includes(one.source)).map((one) => one.code)); // ["YE"][ 'YE' ]出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。