(collection: ModCollection)
| 269 | // --------------------------------------------------------------------------- |
| 270 | |
| 271 | export function getActiveModEntry(collection: ModCollection): ModEntry { |
| 272 | return ( |
| 273 | collection.items[collection.activeId] ?? |
| 274 | Object.values(collection.items)[0] ?? { |
| 275 | config: DEFAULT_MOD, |
| 276 | state: defaultState(DEFAULT_MOD), |
| 277 | } |
| 278 | ); |
| 279 | } |
| 280 | |
| 281 | export function getModList(collection: ModCollection): ModEntry[] { |
| 282 | return Object.values(collection.items); |
no test coverage detected