Module callers are shown as plain labels, never as path-shaped jargon.
(name: string)
| 782 | |
| 783 | /** Module callers are shown as plain labels, never as path-shaped jargon. */ |
| 784 | function callerLabel(name: string): string { |
| 785 | if (!name.includes('/') && !/\.(?:[cm]?[jt]sx?)$/.test(name)) { |
| 786 | return name; |
| 787 | } |
| 788 | const base = name.split('/').filter((part) => part.length > 0).at(-1) ?? name; |
| 789 | return base.replace(/\.(?:[cm]?[jt]sx?)$/, '').replace(/[._-]+/g, ' '); |
| 790 | } |
| 791 | |
| 792 | /** |
| 793 | * The breadth-first short list the guided level used to lead with. |