membersOf関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
The members of a grouping: now, or on a given day for an international body.
インポート
import { membersOf } from "@johnmorrisdotca/kuni/groupings";
定義
function membersOf(id: string, options?: GroupingDateOptions): readonly string[] | null
引数
| 名前 | 型 | 説明 |
|---|---|---|
id | string | The grouping's id. |
options (省略可) | GroupingDateOptions |
|
戻り値
readonly string[] | null
The members' codes, frozen; null for an id that is not a grouping.
例
import { membersOf } from "@johnmorrisdotca/kuni/groupings";
console.log(membersOf("eu")?.includes("GB")); // false
console.log(membersOf("eu", { on: "2019-06-30" })?.includes("GB")); // true
console.log(membersOf("us-pacific")); // ["US-AK", "US-CA", "US-HI", "US-OR", "US-WA"]false
true
[ 'US-AK', 'US-CA', 'US-HI', 'US-OR', 'US-WA' ]出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。