( pathPattern: PluginSettings["pathPattern"] )
| 340 | } |
| 341 | |
| 342 | function assertLegacyStringPathPattern( |
| 343 | pathPattern: PluginSettings["pathPattern"] |
| 344 | ): string { |
| 345 | if (typeof pathPattern !== "string") { |
| 346 | throw new Error( |
| 347 | "Namespace pathPattern objects require the new import/export API." |
| 348 | ); |
| 349 | } |
| 350 | return pathPattern; |
| 351 | } |
| 352 | |
| 353 | function replaceLocale(pathPattern: string, locale: string): string { |
| 354 | return pathPattern.replace(/\{(languageTag|locale)\}/g, locale); |
no outgoing calls
no test coverage detected