ifIs()
If the first and second arguments are the same the third argument is passed back, otherwise the fourth argument (or if not given the first argument) is passed back.
This function is valid in v2.13.0 to v2.24.3. This function has been downloaded 63 times.control
and subject
are the same.subject
control
and subject
are different.trueValue
will be returned if control
is subject
. Otherwise, if opt_falseValue
is given it will be returned, but if not given subject
will be returned.This function directly requires the following functions which are included automatically:
ifExcludes()
ifFail()
subject
against control
and if it results in a false
-ish value falsyValue
will be passed back. Otherwise, if opt_truthyValue
is given it will be passed back, but if not subject
will be passed back.
ifFails()
subject
against control
and if it results in a false
-ish value falsyValue
will be passed back. Otherwise, if opt_truthyValue
is given it will be passed back, but if not control
will be passed back.
ifIn()
ifIncludes()
ifNot()
ifOut()
ifPass()
subject
against control
and if it results in a true
-ish value truthyValue
will be passed back. Otherwise, if opt_falsyValue
is given it will be passed back, but if not subject
will be passed back.
ifPasses()
subject
against control
and if it results in a true
-ish value truthyValue
will be passed back. Otherwise, if opt_falsyValue
is given it will be passed back, but if not control
will be passed back.
indexOf()
Array.prototype.indexOf()
, this function works for finding NaN
and differentiates between -0
and 0
.
This function is directly required by the following functions:
ifExcludes()
ifFail()
subject
against control
and if it results in a false
-ish value falsyValue
will be passed back. Otherwise, if opt_truthyValue
is given it will be passed back, but if not subject
will be passed back.
ifFails()
subject
against control
and if it results in a false
-ish value falsyValue
will be passed back. Otherwise, if opt_truthyValue
is given it will be passed back, but if not control
will be passed back.
ifIn()
ifIncludes()
ifNot()
ifOut()
ifPass()
subject
against control
and if it results in a true
-ish value truthyValue
will be passed back. Otherwise, if opt_falsyValue
is given it will be passed back, but if not subject
will be passed back.
ifPasses()
subject
against control
and if it results in a true
-ish value truthyValue
will be passed back. Otherwise, if opt_falsyValue
is given it will be passed back, but if not control
will be passed back.