manifest関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
Where one flag's drawing comes from, its licence and author, and why it was chosen.
インポート
import { manifest } from "@johnmorrisdotca/hata/manifest";
定義
function manifest(code: string): FlagRecord | null
引数
| 名前 | 型 | 説明 |
|---|---|---|
code | string | A flag's code in any case: "JP", "jp-13", "CA_ON". |
戻り値
FlagRecord | null
The flag's record, or null when the code has no flag here (see leftOut for why).
例
import { manifest } from "@johnmorrisdotca/hata/manifest";
console.log(manifest("JP-13")?.licence.name); // "Public domain"
console.log(manifest("YE")?.source); // "country-flag-icons"
console.log(manifest("XX")); // nullPublic domain
country-flag-icons
null出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。