Skip to content

workflow / Exports / EventHandlerUtils

Class: EventHandlerUtils

Utility functions for event handling

Table of contents

Constructors

Methods

Constructors

constructor

new EventHandlerUtils(): EventHandlerUtils

Returns

EventHandlerUtils

Methods

createPattern

createPattern(pattern): RegExp

Create event pattern from string with wildcards

Parameters

NameType
patternstring

Returns

RegExp

Defined in

interfaces/event-handler.ts:278


matchesPattern

matchesPattern(eventType, pattern): boolean

Test if event matches pattern

Parameters

NameType
eventTypestring
patternEventPattern

Returns

boolean

Defined in

interfaces/event-handler.ts:287


sortHandlersByPriority

sortHandlersByPriority(handlers): EventHandler[]

Sort handlers by priority (highest first)

Parameters

NameType
handlersEventHandler[]

Returns

EventHandler[]

Defined in

interfaces/event-handler.ts:301

Released under the MIT License.