mirror of
https://kevinblog.sytes.net/Code/Jibo-Revival-Group/JiboViteDocs.git
synced 2026-06-15 18:36:19 +00: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);
|
|
} |