set.union
Perform a union of set types.
QueryLogic.set.union(setA, setB)
Performs a union of setA
and setB
and returns the
result. Will throw an error if defineComparison has
not been called with comparison operations
necessary to perform the union. Use union
to perform a union between two plain Query objects.
QueryLogic.set.union
can be used to test custom comparison types:
import {QueryLogic} from "can";
const gt3 = new QueryLogic.GreaterThan(3);
const lt6 = new QueryLogic.LessThan(6);
const union = QueryLogic.union(gt3, lt6);
console.log( union ); //-> QueryLogic.UNIVERSAL
Parameters
- setA
{SetType}
:An instance of a SetType.
- setB
{SetType}
:An instance of a SetType.
Returns
{SetType}
:
An instance of a SetType.