Function: matchesAnySubscription()
Makaio Framework / bus-core / matchesAnySubscription
Function: matchesAnySubscription()
Section titled “Function: matchesAnySubscription()”matchesAnySubscription(
subject,patterns):boolean
Defined in: ../../../packages/bus-core/src/utils/subscription-matching.ts:130
Check if a subject matches any pattern in a collection.
Parameters
Section titled “Parameters”subject
Section titled “subject”string
Subject to match
patterns
Section titled “patterns”Iterable<string>
Collection of subscription patterns
Returns
Section titled “Returns”boolean
true if subject matches at least one pattern
Example
Section titled “Example”matchesAnySubscription('adapter.log', new Set(['adapter.*', 'agent.*']))// → true (matches 'adapter.*')
matchesAnySubscription('adapter:claudeCode.initialized', new Set(['adapter:*']))// → true (matches 'adapter:*')
matchesAnySubscription('session.started', new Set(['adapter.*', 'adapter:*']))// → false (no match)
matchesAnySubscription('adapter.log', new Set())// → false (empty patterns)