rgncycle-ui/app/utils/entities.js

7 lines
171 B
JavaScript
Raw Normal View History

2023-04-27 15:05:12 +02:00
/*
2023-09-22 16:49:32 +02:00
* get entity array as map of key (entity.id) and value (entity) pair
2023-04-25 21:14:11 +02:00
*/
2023-04-27 15:05:12 +02:00
export function getMap(entities){
return new Map(entities.map(item => [item[0],item]));
2023-04-25 21:14:11 +02:00
}