logo

/Code Snippet|v2.3.3

Module

Static Methods

isArguments(obj)isArguments.jsline 20

Check whether the given variable is an arguments object or not.
If the given variable is an arguments object, return true.

PARAMETERS
NameTypeDescription

obj

*

Target for checking

RETURNS:
{

boolean

} - Is arguments?

isArray(obj)isArray.jsline 14

Check whether the given variable is an instance of Array or not.
If the given variable is an instance of Array, return true.

PARAMETERS
NameTypeDescription

obj

*

Target for checking

RETURNS:
{

boolean

} - Is array instance?

isArraySafe(obj)isArraySafe.jsline 15

Check whether the given variable is an instance of Array or not.
If the given variable is an instance of Array, return true.
(It is used for multiple frame environments)

PARAMETERS
NameTypeDescription

obj

*

Target for checking

RETURNS:
{

boolean

} - Is an instance of array?

isBoolean(obj)isBoolean.jsline 14

Check whether the given variable is a boolean or not.
If the given variable is a boolean, return true.

PARAMETERS
NameTypeDescription

obj

*

Target for checking

RETURNS:
{

boolean

} - Is boolean?

isBooleanSafe(obj)isBooleanSafe.jsline 15

Check whether the given variable is a boolean or not.
If the given variable is a boolean, return true.
(It is used for multiple frame environments)

PARAMETERS
NameTypeDescription

obj

*

Target for checking

RETURNS:
{

boolean

} - Is a boolean?

isDate(obj)isDate.jsline 14

Check whether the given variable is an instance of Date or not.
If the given variables is an instance of Date, return true.

PARAMETERS
NameTypeDescription

obj

*

Target for checking

RETURNS:
{

boolean

} - Is an instance of Date?

isDateSafe(obj)isDateSafe.jsline 15

Check whether the given variable is an instance of Date or not.
If the given variables is an instance of Date, return true.
(It is used for multiple frame environments)

PARAMETERS
NameTypeDescription

obj

*

Target for checking

RETURNS:
{

boolean

} - Is an instance of Date?

isEmpty(obj)isEmpty.jsline 49

Check whether the given variable is empty(null, undefined, or empty array, empty object) or not.
If the given variables is empty, return true.

PARAMETERS
NameTypeDescription

obj

*

Target for checking

RETURNS:
{

boolean

} - Is empty?

isExisty(param)isExisty.jsline 30

Check whether the given variable is existing or not.
If the given variable is not null and not undefined, returns true.

PARAMETERS
NameTypeDescription

param

*

Target for checking

RETURNS:
{

boolean

} - Is existy?
EXAMPLES
// ES6
import isExisty from 'tui-code-snippet/type/isExisty');

// CommonJS
const isExisty = require('tui-code-snippet/type/isExisty');

isExisty(''); //true
isExisty(0); //true
isExisty([]); //true
isExisty({}); //true
isExisty(null); //false
isExisty(undefined); //false

isFalsy(obj)isFalsy.jsline 16

Check whether the given variable is falsy or not.
If the given variable is null or undefined or false, returns true.

PARAMETERS
NameTypeDescription

obj

*

Target for checking

RETURNS:
{

boolean

} - Is falsy?

isFunction(obj)isFunction.jsline 14

Check whether the given variable is a function or not.
If the given variable is a function, return true.

PARAMETERS
NameTypeDescription

obj

*

Target for checking

RETURNS:
{

boolean

} - Is function?

isFunctionSafe(obj)isFunctionSafe.jsline 15

Check whether the given variable is a function or not.
If the given variable is a function, return true.
(It is used for multiple frame environments)

PARAMETERS
NameTypeDescription

obj

*

Target for checking

RETURNS:
{

boolean

} - Is a function?

isHTMLNode(html)isHTMLNode.jsline 14

Check whether the given variable is a instance of HTMLNode or not.
If the given variables is a instance of HTMLNode, return true.

PARAMETERS
NameTypeDescription

html

*

Target for checking

RETURNS:
{

boolean

} - Is HTMLNode ?

isHTMLTag(html)isHTMLTag.jsline 14

Check whether the given variable is a HTML tag or not.
If the given variables is a HTML tag, return true.

PARAMETERS
NameTypeDescription

html

*

Target for checking

RETURNS:
{

boolean

} - Is HTML tag?

isNotEmpty(obj)isNotEmpty.jsline 17

Check whether the given variable is not empty
(not null, not undefined, or not empty array, not empty object) or not.
If the given variables is not empty, return true.

PARAMETERS
NameTypeDescription

obj

*

Target for checking

RETURNS:
{

boolean

} - Is not empty?

isNull(obj)isNull.jsline 14

Check whether the given variable is null or not.
If the given variable(arguments0) is null, returns true.

PARAMETERS
NameTypeDescription

obj

*

Target for checking

RETURNS:
{

boolean

} - Is null?

isNumber(obj)isNumber.jsline 14

Check whether the given variable is a number or not.
If the given variable is a number, return true.

PARAMETERS
NameTypeDescription

obj

*

Target for checking

RETURNS:
{

boolean

} - Is number?

isNumberSafe(obj)isNumberSafe.jsline 15

Check whether the given variable is a number or not.
If the given variable is a number, return true.
(It is used for multiple frame environments)

PARAMETERS
NameTypeDescription

obj

*

Target for checking

RETURNS:
{

boolean

} - Is a number?

isObject(obj)isObject.jsline 14

Check whether the given variable is an object or not.
If the given variable is an object, return true.

PARAMETERS
NameTypeDescription

obj

*

Target for checking

RETURNS:
{

boolean

} - Is object?

isString(obj)isString.jsline 14

Check whether the given variable is a string or not.
If the given variable is a string, return true.

PARAMETERS
NameTypeDescription

obj

*

Target for checking

RETURNS:
{

boolean

} - Is string?

isStringSafe(obj)isStringSafe.jsline 15

Check whether the given variable is a string or not.
If the given variable is a string, return true.
(It is used for multiple frame environments)

PARAMETERS
NameTypeDescription

obj

*

Target for checking

RETURNS:
{

boolean

} - Is a string?

isTruthy(obj)isTruthy.jsline 17

Check whether the given variable is truthy or not.
If the given variable is not null or not undefined or not false, returns true.
(It regards 0 as true)

PARAMETERS
NameTypeDescription

obj

*

Target for checking

RETURNS:
{

boolean

} - Is truthy?

isUndefined(obj)isUndefined.jsline 14

Check whether the given variable is undefined or not.
If the given variable is undefined, returns true.

PARAMETERS
NameTypeDescription

obj

*

Target for checking

RETURNS:
{

boolean

} - Is undefined?
Resizable