Methods
escapeHTML(text) → {string}
Escapes the html string.
Escapes the html string.
Example
escapeHTML('<h1>Hell World!</h1>');
// => "<h1>Hell World!</h1>"
Parameters:
Name | Type | Description |
---|---|---|
text |
* | The html string. |
Returns:
A string escaped.
- Type
- string
generateRandomAlphaNum(len) → {string}
Gets a random string.
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.
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.
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.
Checks whether is number.
Parameters:
Name | Type | Description |
---|---|---|
n |
* |
Returns:
true if number, otherwise false.
- Type
- boolean