Table of contents
METHOD |
RETURN |
DESCRIPTION |
---|---|---|
string
|
Method encodes a Resource Query Language (RQL) component by replacing each instance of certain characters by one, two, three, or four escape sequences representing the UTF-8 encoding of the character |
|
string
|
Efficiently escape a string for insertion into HTML (innerHTML or attributes), replacing &, <, >, “, ‘ characters |
|
undefined
|
forEach for object |
|
string
|
Finds out and returns a package APS ID by analyzing the input argument |
|
undefined
|
Show message in notification center |
|
object
|
Calls the specified callback function after the specified delay measured in milliseconds |
|
array
|
Converts array-like objects / collections to a new array |
Method encodes a Resource Query Language (RQL) component by replacing each instance of certain characters by one, two, three, or four escape sequences representing the UTF-8 encoding of the character.
Return: string
ARGUMENT |
TYPE |
DESCRIPTION |
---|---|---|
|
String
|
the string for encode |
Efficiently escape a string for insertion into HTML (innerHTML or attributes), replacing &, <, >, “, ‘ characters.
Return: string
ARGUMENT |
TYPE |
DESCRIPTION |
---|---|---|
|
String
|
the string to escape |
forEach for object. Behavior is similar to the forEach method of the array. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach
Return: undefined
ARGUMENT |
TYPE |
DESCRIPTION |
---|---|---|
|
object
|
Object or array to listing |
|
function
|
Function to execute for each element. |
|
object
|
Optional. Value to use as this when executing callback. |
common.forEach({ a: 1, b: 2 }, function(value, name){
console.log(name + ": " + value); // first step: 'a: 1', second step: 'b: 2'
});
Finds out and returns a package APS ID by analyzing the input argument.
Return: string
ARGUMENT |
TYPE |
DESCRIPTION |
---|---|---|
|
undefined
|
A value can be a string (URI containing the “/aps/2/packages/” pattern) or an object (one of CommonJS module, View, or ViewPlugin). |
Show message in notification center.
Return: undefined
ARGUMENT |
TYPE |
DESCRIPTION |
---|---|---|
|
String
|
The message text. |
|
String
|
The message type. |
Calls the specified callback function after the specified delay measured in milliseconds.
Return: object
ARGUMENT |
TYPE |
DESCRIPTION |
---|---|---|
|
Function
|
Function to execute after the specified delay. |
|
Number
|
The number of milliseconds that the function call should be delayed. |
this.own(common.timeout(function() {
console.log("Delayed message");
}, 1000));
Converts array-like objects / collections to a new array.
Return: array
ARGUMENT |
TYPE |
DESCRIPTION |
---|---|---|
|
array
|
Arguments list |