(keyFunction, collect = false)
| 227 | } |
| 228 | |
| 229 | getBreakdown(keyFunction, collect = false) { |
| 230 | if (keyFunction || collect) { |
| 231 | if (!keyFunction) { |
| 232 | keyFunction = each => each.type; |
| 233 | } |
| 234 | return groupBy(this._values, keyFunction, collect); |
| 235 | } |
| 236 | if (this._breakdown === undefined) { |
| 237 | this._breakdown = groupBy(this._values, each => each.type); |
| 238 | } |
| 239 | return this._breakdown; |
| 240 | } |
| 241 | |
| 242 | depthHistogram() { |
| 243 | return this._values.histogram(each => each.depth); |