getSet()function
getSet(value: PossibleSet<T>): ImmutableSet
| Param | Type | |
|---|---|---|
value | PossibleSet<T> | A Set or any iterable of items. required |
| Return | |
|---|---|
ImmutableSet | A Set containing the items of value. |
Convert a possible set to a Set.
- Returns the input unchanged when it is already a
Set; otherwise constructs a newSetfrom the iterable.
Examples
getSet(["a", "b"]) // Set { "a", "b" }