mirror of
https://github.com/mivodev/mivodev.github.io.git
synced 2026-01-26 13:32:07 +07:00
8 lines
212 B
JavaScript
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);
|
|
} |