1.0.0 • Published 8 years ago
supermatch v1.0.0
supermatch
supermatch(subject,object)
Returns true
if any of the following are true:
- Either
subject
orobject
aretrue
. subject
andobject
are both scalars and match identically.subject
is a scalar andobject
is a RegExp andsubject
matchesobject
.subject
is a scalar andobject
is an array andsubject
matches any inobject
.subject
is a scalar andobject
is a true-array (an object in which all values aretrue
) andsubject
matches any inobject
.subject
is an array and any item insubject
matchesobject
.subject
is a true-array and any item insubject
matchesobject
.
1.0.0
8 years ago