-
Notifications
You must be signed in to change notification settings - Fork 10
/
dump.js
38 lines (31 loc) · 1000 Bytes
/
dump.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/**
* Dumps the portfolio to the console.
*/
const {Console} = require('console');
var json = require('./portfolio');
json[0].symbols = json[0].symbols.sort();
json[1].symbols = json[1].symbols.sort();
console.log('============================');
console.log('Portfolio Event Configuration');
console.log('============================');
console.log();
console.log('Buy Config:');
console.log('----------');
console.log(JSON.stringify(json[0]));
console.log();
console.log('Sell Config:');
console.log('-----------');
console.log(JSON.stringify(json[1]));
console.log();
console.log('===========================');
console.log('Serialized Portfolio Stocks');
console.log('===========================');
console.log();
console.log(`Buy list: Total: (${json[0].symbols.length})`);
console.log('---------');
console.log(json[0].symbols.join(','));
console.log();
console.log(`Sell list: (${json[0].symbols.length})`);
console.log('----------');
console.log(json[1].symbols.join(','));
// dummy