Hi! Do you have plans to support Set operations in this library? Maybe in future? Builtin Set is even more limited than Array so it would defenitely benefit from additional helpers. No other comparable library does it so far, AFAIK.
Letter S is already taken though 😅:
const E = {
intersection<T>(setA: Set<T>, setB: Set<T>): Set<T> {
return new Set([...setA].filter(element => setB.has(element)))
},
difference<T>(setA: Set<T>, setB: Set<T>): Set<T> {
return new Set([...setA].filter(element => !setB.has(element)))
},
}
E.intersection(new Set(["foo", "bar"]), new Set(["bar", "spam"]))
// => new Set(["bar"])
E.difference(new Set(["foo", "bar"]), new Set(["bar", "spam"]))
// => new Set(["foo"])
Hi! Do you have plans to support
Set
operations in this library? Maybe in future? BuiltinSet
is even more limited thanArray
so it would defenitely benefit from additional helpers. No other comparable library does it so far, AFAIK.Letter
S
is already taken though 😅: