supermatch
v1.0.0
Published
Match two values regardless of type.
Readme
supermatch
supermatch(subject,object)
Returns true if any of the following are true:
- Either
subjectorobjectaretrue. subjectandobjectare both scalars and match identically.subjectis a scalar andobjectis a RegExp andsubjectmatchesobject.subjectis a scalar andobjectis an array andsubjectmatches any inobject.subjectis a scalar andobjectis a true-array (an object in which all values aretrue) andsubjectmatches any inobject.subjectis an array and any item insubjectmatchesobject.subjectis a true-array and any item insubjectmatchesobject.
