new(basic.gblib): New TOLIST, APPEND, SORT TO keyword..
This commit is contained in:
parent
dfa2d51e37
commit
24f4cc7f17
3 changed files with 11 additions and 7 deletions
|
@ -139,7 +139,7 @@ export class DialogKeywords {
|
|||
* @example TALK TOLIST (array, member)
|
||||
*
|
||||
*/
|
||||
public toList(array, member) {
|
||||
public getToLst(array, member) {
|
||||
return Array.prototype.map.call(array, (item) => { return item[member]; }).join(",");
|
||||
}
|
||||
|
||||
|
@ -153,7 +153,13 @@ export class DialogKeywords {
|
|||
if (!(date instanceof Date)) {
|
||||
date = new Date(date);
|
||||
}
|
||||
return date.getHours() + ':' + date.getMinutes();
|
||||
function addZero(i) {
|
||||
if (i < 10) {
|
||||
i = "0" + i;
|
||||
}
|
||||
return i;
|
||||
}
|
||||
return addZero(date.getHours()) + ':' + addZero(date.getMinutes());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -165,7 +165,7 @@ export class GBVMService extends GBService {
|
|||
isarray = function(array){return Array.isArray(array) };
|
||||
weekday = this.getWeekFromDate;
|
||||
hour = this.getHourFromDate;
|
||||
tolist = this.toList;
|
||||
tolist = this.getToLst;
|
||||
headers = {};
|
||||
|
||||
${code}
|
||||
|
|
|
@ -74,9 +74,6 @@ export class SystemKeywords {
|
|||
this.dk = dk;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrives the content of a given URL.
|
||||
*/
|
||||
public async append(...args) {
|
||||
return [].concat(...args);
|
||||
}
|
||||
|
@ -792,4 +789,5 @@ export class SystemKeywords {
|
|||
public async numberOnly(text: string) {
|
||||
return text.replace(/\D/gi, '');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue