has
algebra.has(set, props)
Used to tell if the set
contains the instance object props
.
var algebra = new set.Algebra(
new set.Translate("where","$where")
);
algebra.has(
{"$where": {playerId: 5}},
{id: 5, type: "3pt", playerId: 5, gameId: 7}
) //-> true
Parameters
- set
{Set}
:A set.
- props
{Object}
:An instance's raw data.
Returns
{Boolean}
:
Returns true
if props
belongs in set
and
false
it not.