(pattern: string)
| 63 | * `*` expands to match zero or more valid topic characters. |
| 64 | */ |
| 65 | export function topicPatternToRegex(pattern: string): RegExp { |
| 66 | const parts = pattern.split('*').map(s => s.replace(/-/g, '\\-')); |
| 67 | return new RegExp(`^${parts.join('[A-Za-z0-9_\\-]*')}$`); |
| 68 | } |
| 69 | |
| 70 | export interface EnqueueOptions { |
| 71 | retentionSeconds?: number; |
no test coverage detected