Global

Methods

escapeHTML(text) → {string}

Escapes the html string.

Source:

Escapes the html string.

Example
escapeHTML('<h1>Hell World!</h1>');
// => "&lt;h1&gt;Hell World!&lt;/h1&gt;"
Parameters:
Name Type Description
text *

The html string.

Returns:

A string escaped.

Type
string

generateRandomAlphaNum(len) → {string}

Gets a random string.

Source:

Gets a random string.

Example
generateRandomAlphaNum(10);
// => "4zvu4la1cd"
Parameters:
Name Type Description
len number

The random string length.

Returns:

A random string.

Type
string

isArray(obj) → {boolean}

Checks whether is an Array.

Source:

Checks whether is an Array.

Parameters:
Name Type Description
obj *

The target.

Returns:

true if an array, otherwise false.

Type
boolean

isFunction(obj) → {boolean}

Checks whether is a function.

Source:

Checks whether is a function.

Parameters:
Name Type Description
obj *

The target.

Returns:

true if function, otherwise false.

Type
boolean

isNumber(n) → {boolean}

Checks whether is number.

Source:

Checks whether is number.

Parameters:
Name Type Description
n *
Returns:

true if number, otherwise false.

Type
boolean