(value)
| 14 | // @pragma Construction |
| 15 | |
| 16 | constructor(value) { |
| 17 | // eslint-disable-next-line no-constructor-return |
| 18 | return value === undefined || value === null |
| 19 | ? emptySet() |
| 20 | : isSet(value) && !isOrdered(value) |
| 21 | ? value |
| 22 | : emptySet().withMutations((set) => { |
| 23 | const iter = SetCollection(value); |
| 24 | assertNotInfinite(iter.size); |
| 25 | iter.forEach((v) => set.add(v)); |
| 26 | }); |
| 27 | } |
| 28 | |
| 29 | static of(/*...values*/) { |
| 30 | return this(arguments); |
no test coverage detected