(token: string)
| 12 | |
| 13 | // $FlowFixMe |
| 14 | function 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 | |
| 30 | const regexValidFrame_Chrome = /^\s*(at|in)\s.+(:\d+)/; |
| 31 | const regexValidFrame_FireFox = /(^|@)\S+:\d+|.+line\s+\d+\s+>\s+(eval|Function).+/; |