MCPcopy Index your code
hub / github.com/bigskysoftware/_hyperscript / matchesEventPattern

Function matchesEventPattern

www/js/_hyperscript-max.js:11644–11649  ·  view source on GitHub ↗
(pattern, eventName)

Source from the content-addressed store, hash-verified

11642 }
11643 }
11644 function matchesEventPattern(pattern, eventName) {
11645 if (pattern === eventName) return true;
11646 if (!pattern.includes("*")) return false;
11647 var regex = new RegExp("^" + pattern.replace(/[.+^${}()|[\]\\]/g, "\\$&").replace(/\*/g, ".*") + "$");
11648 return regex.test(eventName);
11649 }
11650 var EventSourceFeature = class _EventSourceFeature extends Feature {
11651 static keyword = "eventsource";
11652 constructor(eventSourceName, nameSpace, stub) {

Callers 1

dispatchFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected