diff --git a/src/parse.ts b/src/parse.ts index 8fbf62a..4299320 100644 --- a/src/parse.ts +++ b/src/parse.ts @@ -1,4 +1,3 @@ -import { URL } from './universal-url' import Local from './local' import Search from './search' import Playlist from './playlist' diff --git a/src/universal-url.ts b/src/universal-url.ts deleted file mode 100644 index e707de0..0000000 --- a/src/universal-url.ts +++ /dev/null @@ -1,19 +0,0 @@ -let URLClass: typeof URL; - -declare var window: any; - -if (typeof window !== "undefined" && typeof window.URL !== "undefined") { - // for browser environment - URLClass = URL; -} else if (typeof global !== "undefined" && typeof global.URL !== "undefined") { - // for react native environment - URLClass = URL; -} else if (typeof require !== "undefined") { - // for Node.js environment - const { URL } = require("url"); - URLClass = URL; -} else { - throw new Error("Unsupported environment"); -} - -export { URLClass as URL };