Returns true
if the input is a string (literal or String instance) containing 0 characters.
Returns false
for all other values.
Returns true
if the input value is exactly false
.
Returns false
for all other values, including "falsy" ones.
Returns true
if the input is a string (literal or String instance) containing one or more characters.
Returns false
for all other values.
Returns true
if the input is exactly true
.
Returns false
for all other values, even "truthy" ones.
Returns false
if the input value is exactly false
.
Returns true
for all other values, including "falsy" ones.
Returns true
if the input value is not considered a "falsy" value.
Returns false
if the input value is exactly null
.
Returns true
for all other values, including undefined
.
Returns false
if the input value is exactly true
.
Returns true
for all other values, including "truthy" ones.
Returns true
if the input value is not considered a "truthy" value.
This module contains various utility methods for checking values. They can be used to test equality or validity of data, such as if a value is exactly
true
, or if it is an empty string (and not justnull
).Many of the methods in this module are trivial. The intent is to provide explicit checks for values, since type coercion in JavaScript can at times cause equality checks to be maddeningly non-apparent and inconsistent (see dotJS 2012 - Brian Leroux - WTFJS.)