lint fixes
This commit is contained in:
parent
1f190b1068
commit
c1d04723e1
17 changed files with 34 additions and 27 deletions
|
|
@ -337,10 +337,11 @@ export function calculateRollingMetrics(
|
|||
case 'volatility':
|
||||
rollingMetrics.push(calculateVolatility(window));
|
||||
break;
|
||||
case 'return':
|
||||
case 'return': {
|
||||
const avgReturn = window.reduce((sum, ret) => sum + ret, 0) / window.length;
|
||||
rollingMetrics.push(avgReturn);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,10 @@
|
|||
export function createProxyUrl(proxy: any): string {
|
||||
export function createProxyUrl(proxy: {
|
||||
protocol: string;
|
||||
host: string;
|
||||
port: number;
|
||||
username?: string;
|
||||
password?: string;
|
||||
}): string {
|
||||
const { protocol, host, port, username, password } = proxy;
|
||||
if (username && password) {
|
||||
return `${protocol}://${encodeURIComponent(username)}:${encodeURIComponent(password)}@${host}:${port}`;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue