diff --git a/package.json b/package.json index d93216a..a337606 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ztimson/utils", - "version": "0.25.15", + "version": "0.25.16", "description": "Utility library", "author": "Zak Timson", "license": "MIT", diff --git a/src/path-events.ts b/src/path-events.ts index dd7cd51..bfa43ba 100644 --- a/src/path-events.ts +++ b/src/path-events.ts @@ -99,7 +99,7 @@ export class PathEvent { method = '*'; } let temp = p.split('/').filter(p => !!p); - this.module = temp.splice(0, 1)[0]?.toLowerCase() || ''; + this.module = temp.splice(0, 1)[0] || ''; this.path = temp.join('/'); this.fullPath = `${this.module}${this.module && this.path ? '/' : ''}${this.path}`; this.name = temp.pop() || ''; @@ -265,7 +265,7 @@ export class PathEventEmitter implements IPathEventEmitter{ on(event: Event | Event[], listener: PathListener): PathUnsubscribe { makeArray(event).forEach(e => this.listeners.push([ - new PathEvent(`${this.prefix}/${new PathEvent(e).toString()}`), + new PathEvent(`${this.prefix}/${e}`), listener ])); return () => this.off(listener);