()
| 106 | } |
| 107 | |
| 108 | async getForPromString() { |
| 109 | if (this.collect) { |
| 110 | const v = this.collect(); |
| 111 | if (v instanceof Promise) await v; |
| 112 | } |
| 113 | const data = Object.values(this.hashMap); |
| 114 | const values = data |
| 115 | .map(extractBucketValuesForExport(this)) |
| 116 | .reduce(addSumAndCountForExport(this), []); |
| 117 | |
| 118 | return { |
| 119 | name: this.name, |
| 120 | help: this.help, |
| 121 | type: this.type, |
| 122 | values, |
| 123 | aggregator: this.aggregator, |
| 124 | }; |
| 125 | } |
| 126 | |
| 127 | reset() { |
| 128 | this.hashMap = {}; |
no test coverage detected