From 8510c96cad1dcc14e337068659e4cd3f583dc95e Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Fri, 5 Aug 2022 20:06:08 -0400 Subject: [PATCH] *Remove unused functions --- src/rpc/ipfs.ts | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/src/rpc/ipfs.ts b/src/rpc/ipfs.ts index 9c243fd..191c1b2 100644 --- a/src/rpc/ipfs.ts +++ b/src/rpc/ipfs.ts @@ -81,36 +81,6 @@ async function initIpfs() { client = await client; } -function joinURLParts(...urls: string[]) { - urls = urls.filter((url) => url.length > 0); - urls = [""].concat(urls.map((url) => removeSlashFromBothEnds(url))); - - return urls.join("/"); -} - -function removeSlashFromBothEnds(url: string): string { - url = removeLeadingSlash(url); - url = removeTrailingSlash(url); - - return url; -} - -function removeLeadingSlash(url: string): string { - if (url[0] === "/") { - url = url.substring(1); - } - - return url; -} - -export function removeTrailingSlash(url: string): string { - if (url.endsWith("/")) { - url = url.substring(0, url.length - 1); - } - - return url; -} - initIpfs(); function normalizePath(