Improve code quality and add comments

This commit is contained in:
kevinpauer
2022-05-08 19:52:08 +02:00
parent a2b4686528
commit 0fc9e8d37f
10 changed files with 66 additions and 10 deletions

View File

@@ -9,12 +9,17 @@ export class HelperService {
constructor(private botService: BotService) {}
/**
* Function to delay loading of webpage for a smoother user experience
* @param {number} ms
*/
delay(ms: number) {
return new Promise((resolve) => setTimeout(resolve, ms));
}
/**
* Function to format share data
* @returns Share
*/
formatShareData(): Share[] {
var shares: Share[] = [];
this.botService.getSymbols().subscribe((result) => {
@@ -27,7 +32,10 @@ export class HelperService {
});
return shares;
}
/**
* @returns Keyword
* Function to format keyword data
*/
formatKeywordsData(): Keyword[] {
var keywords: Keyword[] = [];
this.botService.getKeywords().subscribe((result) => {