Skip to content

Commit

Permalink
Created if/else statement chain
Browse files Browse the repository at this point in the history
  • Loading branch information
shadowtime2000 committed Oct 7, 2020
1 parent ffb8688 commit b50df1c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion mod/path.ts
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
export default (meta: ImportMeta): string => meta.url.slice(8, meta.url.length);
export default (meta: ImportMeta): string => {
if (meta.url.startsWith("file:///")) return meta.url.slice(8, meta.url.length);
else if (meta.url.startsWith("http://")) return meta.url.slice(7, meta.url.length);
else if (meta.url.startsWith("https://")) return meta.url.slice(8, meta.url.length);
else if (true) return meta.url;
};

0 comments on commit b50df1c

Please sign in to comment.