MCPcopy Index your code
hub / github.com/callumalpass/tasknotes / getVisibleStatsProjectNames

Function getVisibleStatsProjectNames

src/views/StatsView.ts:135–152  ·  view source on GitHub ↗
(
	projects: string[] | undefined,
	options: VisibleStatsProjectNamesOptions
)

Source from the content-addressed store, hash-verified

133}
134
135export function getVisibleStatsProjectNames(
136 projects: string[] | undefined,
137 options: VisibleStatsProjectNamesOptions
138): string[] {
139 if (!Array.isArray(projects)) {
140 return [options.noProjectLabel];
141 }
142
143 const filteredProjects = filterEmptyProjects(projects);
144 if (filteredProjects.length === 0) {
145 return [options.noProjectLabel];
146 }
147
148 return filteredProjects
149 .filter((project) => !options.isArchivedProjectReference?.(project))
150 .map((project) => options.consolidateProjectName(project))
151 .filter((project): project is string => typeof project === "string" && project.length > 0);
152}
153
154interface ProjectDrilldownData {
155 projectName: string;

Calls 3

filterEmptyProjectsFunction · 0.90

Tested by

no test coverage detected