We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 890618c + ef24523 commit 2400a1eCopy full SHA for 2400a1e
1 file changed
src/services/Summary/summary-processing.js
@@ -0,0 +1,20 @@
1
+function summary_processing(logs) {
2
+ let type = {};
3
+ logs.forEach( (log) => {
4
+ // Process all types of logs and count each one of them
5
+ if ( type[log.type] !== undefined ) {
6
+ type[log.type].count +=1;
7
+ type[log.type].interactions[log.interaction] = (type[log.type].interactions[log.interaction] + 1) || 1;
8
+ } else {
9
+ type[log.type] = {
10
+ count: 1,
11
+ interactions: {}
12
+ }
13
+ type[log.type].interactions[log.interaction] = 1;
14
15
+ })
16
+
17
+ return type;
18
+}
19
20
+export { summary_processing };
0 commit comments