MCPcopy Create free account
hub / github.com/ZenNotes/zennotes / countNotesInTree

Function countNotesInTree

packages/app-core/src/components/Sidebar.tsx:3933–3939  ·  view source on GitHub ↗
(node: TreeNode)

Source from the content-addressed store, hash-verified

3931}
3932
3933function countNotesInTree(node: TreeNode): number {
3934 return (
3935 node.notes.length +
3936 node.assets.length +
3937 node.children.reduce((s, c) => s + countNotesInTree(c), 0)
3938 );
3939}
3940
3941/* ---------- Tree rendering ---------- */
3942

Callers 3

SidebarFunction · 0.85
FolderTreeRootFunction · 0.85
SubTreeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected