2025-08-04 18:41:00 -04:00

8 lines
212 B
JavaScript

export function getItemsCount(state) {
if (state.collections.length === 0) {
return 0;
}
return state.collections.reduce(function (sum, collection) {
return sum + collection.items.length;
}, 0);
}