MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / shortPath

Method shortPath

tools/xsbug-log/xsbug-debugmachine.js:723–731  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

721 }
722
723 shortPath(path) {
724 // Show just the filename for readability
725 if (!path)
726 return path;
727 const slash = path.lastIndexOf('/');
728 if (slash >= 0)
729 return path.slice(slash + 1);
730 return path;
731 }
732
733 isExpandable(item) {
734 return item && item.flags && item.flags.charAt(0) === '+';

Callers 7

printLocationMethod · 0.95
cmdBreakMethod · 0.95
cmdDeleteMethod · 0.95
cmdClearMethod · 0.95
cmdBacktraceMethod · 0.95
cmdFrameMethod · 0.95
cmdInfoBreakpointsMethod · 0.95

Calls 1

sliceMethod · 0.65

Tested by

no test coverage detected