fix lint errors
This commit is contained in:
@@ -87,7 +87,7 @@ export function groupOn<T, S>(f: (x: T) => S, xs: T[]): T[][] {
|
||||
export function groupByX<T>(collections: T[], keySelector: (x: T) => string) {
|
||||
return collections.reduce((obj: Record<string, T[]>, item: T) => {
|
||||
const key = keySelector(item);
|
||||
if (!obj.hasOwnProperty(key)) {
|
||||
if (!Object.prototype.hasOwnProperty.call(obj, key)) {
|
||||
obj[key] = [];
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user