feat: add tradingview base

This commit is contained in:
ding
2021-11-21 09:42:01 +08:00
parent 5e8af7f3e5
commit 1db7d8f03d
730 changed files with 21442 additions and 11039 deletions
+20
View File
@@ -0,0 +1,20 @@
/**
* If you want to enable logs from datafeed set it to `true`
*/
var isLoggingEnabled = false;
export function logMessage(message) {
if (isLoggingEnabled) {
var now = new Date();
// tslint:disable-next-line:no-console
console.log(now.toLocaleTimeString() + "." + now.getMilliseconds() + "> " + message);
}
}
export function getErrorMessage(error) {
if (error === undefined) {
return '';
}
else if (typeof error === 'string') {
return error;
}
return error.message;
}