Refactor code to use Path class

This commit is contained in:
Zaid Abdulla committed 2019-02-26 01:38:23 -08:00
1 parent 006f83a478
commit f878d828eb
13 files changed
+663 -784

No files matched your search

+6
View File
@@ -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(() => {