Namespace Jelo.Valid
Simple methods to assert that various objects exist or are of a
given type.
Defined in: Jelo.Valid.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Method Attributes | Method Name and Description |
---|---|
<static> |
Jelo.Valid.is(item)
Checks whether an object exists (not necessarily truthy).
|
<static> |
Jelo.Valid.isArray(item)
Checks whether an object is an array or array subclass.
|
<static> |
Jelo.Valid.isElement(item)
Checks whether an object is an HTML/DOM element.
|
<static> |
Jelo.Valid.isEmail(item)
Checks whether an e-mail address is formatted correctly.
|
<static> |
Jelo.Valid.isFunction(item)
Checks whether an object is a Function.
|
<static> |
Jelo.Valid.isIterable(item)
Checks whether an object is "Array-like" and can probably
be iterated over, looped through, etc.
|
<static> |
Jelo.Valid.isNumber(item)
Check whether an object is a Number.
|
Method Detail
<static>
{Boolean}
Jelo.Valid.is(item)
Checks whether an object exists (not necessarily truthy).
- Parameters:
- {Mixed} item
- The item to investiate.
- Returns:
- {Boolean} False only for null and undefined values
<static>
{Boolean}
Jelo.Valid.isArray(item)
Checks whether an object is an array or array subclass.
- Parameters:
- {Mixed} item
- The item to investiate.
- Returns:
- {Boolean} True if item is an array or array subclass.
<static>
{Boolean}
Jelo.Valid.isElement(item)
Checks whether an object is an HTML/DOM element.
- Parameters:
- {Mixed} item
- The item to investiate.
- Returns:
- {Boolean} True if item is an HTMLElement-like object.
<static>
{Boolean}
Jelo.Valid.isEmail(item)
Checks whether an e-mail address is formatted correctly.
- Parameters:
- {Mixed} item
- The item to investiate.
- Returns:
- {Boolean} True if item is formatted like a valid e-mail address. The actual account may or may not exist. Future versions of Jelo will include a check for actual e-mail accounts.
<static>
{Boolean}
Jelo.Valid.isFunction(item)
Checks whether an object is a Function.
- Parameters:
- {Mixed} item
- The item to investiate.
- Returns:
- {Boolean} True if item is a Function.
<static>
{Boolean}
Jelo.Valid.isIterable(item)
Checks whether an object is "Array-like" and can probably
be iterated over, looped through, etc.
- Parameters:
- {Mixed} item
- The item to investiate.
- Returns:
- {Boolean} True if item is iterable.
<static>
{Boolean}
Jelo.Valid.isNumber(item)
Check whether an object is a Number.
- Parameters:
- {Mixed} item
- The item to investiate.
- Returns:
- {Boolean} True if item is a Number.