MCPcopy Create free account
hub / github.com/mitmproxy/mitmproxy / extractProcessName

Function extractProcessName

web/src/js/components/Modes/LocalDropdown.tsx:37–41  ·  view source on GitHub ↗
(process: Process)

Source from the content-addressed store, hash-verified

35 };
36
37 const extractProcessName = (process: Process) => {
38 // we cannot use directly the display_name because it is exposed by every executable and it might lead to unexpected results
39 const separator = platform.startsWith("win32") ? "\\" : "/";
40 return rpartition(process.executable, separator)[1];
41 };
42
43 // This function can take a Process in the case of the dropdown list or a string in the case of the input field when we want to add a process which is not in the list
44 const addProcessToSelection = (option: Process | string) => {

Callers 4

addProcessToSelectionFunction · 0.85
isSelectedFunction · 0.85
LocalDropdownFunction · 0.85

Calls 1

rpartitionFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…