set.difference
Perform a difference of set types.
QueryLogic.set.difference(setA, setB)
Performs a difference 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 difference. Use difference
to perform a difference between two plain Query objects.
QueryLogic.set.difference
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 diff = QueryLogic.difference(gt3, lt6);
console.log( diff ); //-> new QueryLogic.GreaterThanEqual(6)
Parameters
- setA
{SetType}
:An instance of a SetType.
- setB
{SetType}
:An instance of a SetType.
Returns
{SetType}
:
An instance of a SetType.