MCPcopy Create free account
hub / github.com/Snapchat/Valdi / cleanFunctionName

Function cleanFunctionName

valdi/src/valdi/hermes/HermesDebuggerConnection.cpp:178–184  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

176}
177
178static StringBox cleanFunctionName(const StringBox& functionName) {
179 if (functionName.length() > 2 && functionName.hasPrefix("#") && functionName.hasSuffix("#")) {
180 return functionName.substring(1, functionName.length() - 1);
181 } else {
182 return functionName;
183 }
184}
185
186// Compatability workaround for proper Source mapping in Hermes Profiler
187// Replace scriptIds in the profile nodes with the actual scriptIds based on the URL

Callers 2

handleProfilerStopMethod · 0.85
handlePausedMethod · 0.85

Calls 4

hasPrefixMethod · 0.80
hasSuffixMethod · 0.80
substringMethod · 0.80
lengthMethod · 0.45

Tested by

no test coverage detected