Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
rows.forEach((row) => {
const value = this.source.data[getter][row]
let group = groupsByValue.get(value)
if (!group) {
const groupingKey = parentGroup ? `${parentGroup.groupingKey}${this.groupingDelimiter}${value}` : `${value}`
group = Object.assign(new Group(), {value, level, groupingKey}) as any
groups.push(group!)
groupsByValue.set(value, group!)
}
group!.rows.push(row)
})