mirror of
https://github.com/actualbudget/actual.git
synced 2026-05-08 21:12:08 -05:00
9 lines
213 B
JavaScript
9 lines
213 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);
|
|
} |