subsuper
subsuper<
T>(arbitrary,constraints):Dependent<[T[],T[],T[]]>
It generates a pair of sets, and returns the first set, the union of the two sets, and the difference between the union and the first set
Example
random(subsuper(integer({ min: 0, max: 100 })))// => [[1, 2], [1, 2, 4, 5], [4, 5]]Type Parameters
• T
Parameters
arbitrary
Arbitrary<T>
The arbitrary to generate a set of.
constraints
MaybePartial<SubsuperGenerator<T>> = {}
The constraints to generate the set with.
Returns
Dependent<[T[], T[], T[]]>
An arbitrary that is randomly chosen from the weighted list.