Refactor code to use Path class
This commit is contained in:
1 parent
006f83a478
commit
f878d828eb
13 files changed
+663
-784
No files matched your search
@@ -172,6 +172,12 @@ export default class Path {
|
||||
const alias = this.alias | (path.alias << this.segments.length);
|
||||
return new Path(segments, wildcard, alias);
|
||||
}
|
||||
|
||||
public stripAlias(): Path {
|
||||
if (!this.alias) return this;
|
||||
const segments = this.segments.map(s => (Array.isArray(s) ? "*" : s));
|
||||
return new Path(segments, this.wildcard | this.alias, 0);
|
||||
}
|
||||
}
|
||||
|
||||
const interval = setInterval(() => {
|
||||
|
||||
Reference in new issue
Block a user