flag関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
The flag of a country as an emoji: two regional-indicator letters, which most systems draw as the flag and some (Windows) as the two letters. Write the country's name beside it.
インポート
import { flag } from "@johnmorrisdotca/kuni";
定義
function flag(code: string): string | null
引数
| 名前 | 型 | 説明 |
|---|---|---|
code | string | Any code |
戻り値
string | null
The emoji; null for a code that is not a country.
例
import { flag } from "@johnmorrisdotca/kuni";
console.log(flag("JP")); // "🇯🇵"
console.log(flag("XX")); // null🇯🇵
null出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。