MCPcopy Index your code
hub / github.com/CapSoftware/Cap / findCapMainProcess

Function findCapMainProcess

apps/desktop/scripts/desktop-memory-soak-lib.js:137–144  ·  view source on GitHub ↗
(
	processes,
	appCommandPrefix = DEFAULTS.appCommandPrefix,
)

Source from the content-addressed store, hash-verified

135}
136
137export function findCapMainProcess(
138 processes,
139 appCommandPrefix = DEFAULTS.appCommandPrefix,
140) {
141 return processes
142 .filter((processInfo) => processInfo.command === appCommandPrefix)
143 .sort((left, right) => right.etimes - left.etimes)[0];
144}
145
146export function discoverTrackedProcesses(
147 processes,

Callers 3

waitForAppFunction · 0.90
mainFunction · 0.90
discoverTrackedProcessesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected