isSpecial
Return if a query is a special query.
queryLogic.isSpecial(query)
Returns true
if query is
UNIVERSAL, EMPTY, UNDEFINABLE, or UNKNOWABLE.
import {QueryLogic} from "can";
const queryLogic = new QueryLogic();
const emptyObject = queryLogic.isSpecial({});
console.log( emptyObject ); //-> false
const testQuery = queryLogic.isSpecial({filter: {type: "Test"}});
console.log( testQuery ); //-> false
const universal = queryLogic.isSpecial(QueryLogic.UNIVERSAL);
console.log( universal ); //-> true
const undefinable = queryLogic.isSpecial(QueryLogic.UNDEFINABLE);
console.log( undefinable ); //-> true
Parameters
- a
{Query}
:A query.