MCPcopy Index your code
hub / github.com/react/create-react-app / extractLocation

Function extractLocation

packages/react-error-overlay/src/utils/parser.js:14–28  ·  view source on GitHub ↗
(token: string)

Source from the content-addressed store, hash-verified

12
13// $FlowFixMe
14function extractLocation(token: string): [string, number, number] {
15 return (
16 regexExtractLocation
17 .exec(token)
18 // $FlowFixMe
19 .slice(1)
20 .map(v => {
21 const p = Number(v);
22 if (!isNaN(p)) {
23 return p;
24 }
25 return v;
26 })
27 );
28}
29
30const regexValidFrame_Chrome = /^\s*(at|in)\s.+(:\d+)/;
31const regexValidFrame_FireFox = /(^|@)\S+:\d+|.+line\s+\d+\s+>\s+(eval|Function).+/;

Callers 1

parseStackFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected