decentraland / decentraland/builder
Refactor: Remove toLowerCase from indexById on Bridge
Open
- Dominant language
- TypeScript
- Stars
- 156
- Forks
- 91
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 31
Description
It shouldn't really change anything and it should allow us to rewrite the indexById as
```ts
static indexById(
list: (T | undefined)[]
): Record {
return this.indexBy(list, 'id')
}
static indexBy, K extends string>(
list: (T | undefined)[],
prop: K
): Record {
return list.reduce((obj, result) => {
if (result) {
const key = result[prop]
obj[key as string] = result
}
return obj
}, {} as Record)
}
```
Contributor guide
Assessment
This issue has not been assessed yet.