(source: any)
| 359 | * @internal please do not use. |
| 360 | */ |
| 361 | export function getLocationId(source: any): string { |
| 362 | if (source == null || typeof source !== 'object') { |
| 363 | return ''; |
| 364 | } |
| 365 | source = source.constructor.name; |
| 366 | const errorTrace = stackTrace(); |
| 367 | const locationMatch = errorTrace.match( |
| 368 | new RegExp( |
| 369 | // get two lines beyond ActiveJS scope https://regexr.com/5eb9g |
| 370 | `new ${source}\\b.+\\n(?:[\\s\\S]+new (?:AsyncSystem|Cluster)\\b.+\\n)?((?:.+\\n?){1,2})` |
| 371 | ) |
| 372 | ); |
| 373 | return hashCode(locationMatch?.[1] || errorTrace); |
| 374 | } |
no test coverage detected