MCPcopy
hub / github.com/gitify-app/gitify / getNotificationCount

Function getNotificationCount

src/renderer/utils/notifications/notifications.ts:34–41  ·  view source on GitHub ↗
(
  accountNotifications: AccountNotifications[],
)

Source from the content-addressed store, hash-verified

32 * @returns The count of all notifications.
33 */
34export function getNotificationCount(
35 accountNotifications: AccountNotifications[],
36) {
37 return accountNotifications.reduce(
38 (sum, account) => sum + account.notifications.length,
39 0,
40 );
41}
42
43/**
44 * Get the count of notifications across all accounts.

Callers 2

useNotificationsFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected