(text: string)
| 273 | |
| 274 | /** Normalise the call text the rules see: `await`/`new` dropped, `?.` as `.`, `this.` kept. */ |
| 275 | export function normaliseCall(text: string): string { |
| 276 | return text |
| 277 | .replace(/^\s*(?:await|new|yield|return|throw)\s+/, '') |
| 278 | .replace(/^\s*(?:await|new)\s+/, '') |
| 279 | .replace(/\?\./g, '.') |
| 280 | .replace(/!\./g, '.') |
| 281 | .replace(/\s+/g, '') |
| 282 | .replace(/<[^<>]*>/g, ''); |
| 283 | } |
| 284 | |
| 285 | /** |
| 286 | * Swift names the table knows from other stacks: Foundation's `Timer` |
no outgoing calls
no test coverage detected