I've often needed to cache array elements by a unique key each element has,
for quick access.

This is a shortcut:

```javascript
const elementsById = elements.toObjectByProperty(element=>element.id);
```

Support?
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to