MCPcopy Index your code
hub / github.com/plotly/dash / describeComponentFrame

Function describeComponentFrame

dash/deps/react@16.14.0.js:179–209  ·  view source on GitHub ↗
(name, source, ownerName)

Source from the content-addressed store, hash-verified

177
178 var BEFORE_SLASH_RE = /^(.*)[\\\/]/;
179 function describeComponentFrame (name, source, ownerName) {
180 var sourceInfo = '';
181
182 if (source) {
183 var path = source.fileName;
184 var fileName = path.replace(BEFORE_SLASH_RE, '');
185
186 {
187 // In DEV, include code for a common special case:
188 // prefer "folder/index.js" instead of just "index.js".
189 if (/^index\./.test(fileName)) {
190 var match = path.match(BEFORE_SLASH_RE);
191
192 if (match) {
193 var pathBeforeSlash = match[1];
194
195 if (pathBeforeSlash) {
196 var folderName = pathBeforeSlash.replace(BEFORE_SLASH_RE, '');
197 fileName = folderName + '/' + fileName;
198 }
199 }
200 }
201 }
202
203 sourceInfo = ' (at ' + fileName + ':' + source.lineNumber + ')';
204 } else if (ownerName) {
205 sourceInfo = ' (created by ' + ownerName + ')';
206 }
207
208 return '\n in ' + (name || 'Unknown') + sourceInfo;
209 }
210
211 var Resolved = 1;
212 function refineResolvedLazyComponent(lazyComponent) {

Callers 1

react@16.14.0.jsFile · 0.70

Calls 2

testMethod · 0.45
matchMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…