organisationId関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
The id of an organisation's flag, from an id written loosely: either case, with spaces around it. The org: may
be left off ("EU", " eu ").
インポート
import { organisationId } from "@johnmorrisdotca/hata/organisations";
定義
function organisationId(input: string): OrganisationId | null
引数
| 名前 | 型 | 説明 |
|---|---|---|
input | string | An id, with or without |
戻り値
"org:eu" | "org:caricom" | "org:arab-league" | "org:cis" | "org:commonwealth" | "org:andean-community" | "org:oic" | null
The id as this package writes it ("org:eu"), or null when it is no id or the organisation has no flag here.
例
import { organisationId } from "@johnmorrisdotca/hata/organisations";
console.log(organisationId("ORG:EU")); // "org:eu"
console.log(organisationId(" eu ")); // "org:eu"
console.log(organisationId("org:xx")); // nullorg:eu
org:eu
null出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。