@ztimson/utils 0.26.5 → 0.26.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1993,10 +1993,13 @@ class PathEventEmitter {
1993
1993
  this.listeners = this.listeners.filter((l) => l[1] != listener);
1994
1994
  }
1995
1995
  on(event, listener) {
1996
- makeArray(event).forEach((e) => this.listeners.push([
1997
- e instanceof PathEvent ? e : new PathEvent(`${this.prefix}/${e}`),
1998
- listener
1999
- ]));
1996
+ makeArray(event).forEach((e) => {
1997
+ if (typeof e == "string" && e[0] == "*" && this.prefix) e = e.slice(1);
1998
+ this.listeners.push([
1999
+ e instanceof PathEvent ? e : new PathEvent(`${this.prefix}/${e}`),
2000
+ listener
2001
+ ]);
2002
+ });
2000
2003
  return () => this.off(listener);
2001
2004
  }
2002
2005
  once(event, listener) {