unknownMembersOf関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
The members of an international body on a day whose membership on that day is unknown: those with no joining day in
any source, and those whose joining or leaving year or month is the day's and no day is given; membersOf(id, { on })
leaves them out. Without on, or for a grouping that is not a body, none.
インポート
import { unknownMembersOf } from "@johnmorrisdotca/kuni/groupings";
定義
function unknownMembersOf(id: string, options?: GroupingDateOptions): readonly string[] | null
引数
| 名前 | 型 | 説明 |
|---|---|---|
id | string | The grouping's id. |
options (省略可) | GroupingDateOptions |
|
戻り値
readonly string[] | null
The codes, frozen, in order; null for an id that is not a grouping.
例
import { membersOf, unknownMembersOf } from "@johnmorrisdotca/kuni/groupings";
console.log(membersOf("g20", { on: "2015-01-01" })?.includes("AR")); // false when no source gives Argentina's day
console.log(unknownMembersOf("g20", { on: "2015-01-01" })?.includes("AR")); // true: unknown, not a non-member
console.log(unknownMembersOf("g7", { on: "1975-06-01" })?.includes("DE")); // true: the page gives 1975 only
console.log(membersOf("g7", { on: "1976-12-31" })?.includes("CA")); // true: 1976 counts from its end
console.log(unknownMembersOf("g20")); // []false
true
true
true
[]出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。