customFlag関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
A registered custom flag's SVG, the checked and rewritten one, with a viewBox and no width or height, like a country's: frame() and toDataUri() from the main entry take it.
インポート
import { customFlag } from "@johnmorrisdotca/hata/custom";
定義
function customFlag(id: string): string | null
引数
| 名前 | 型 | 説明 |
|---|---|---|
id | string | The flag's id, in any case. |
戻り値
string | null
The SVG string, or null when no such flag is registered.
例
import { customFlag } from "@johnmorrisdotca/hata/custom";
console.log(customFlag("custom:nothing-here")); // nullnull出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。