We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
isUrl()
1 parent 833af42 commit df5e157Copy full SHA for df5e157
src/utils/base64.ts
@@ -23,7 +23,7 @@ const isFilePromise = (file: string | Buffer): Promise<boolean> =>
23
});
24
25
26
-const isUrl = (file: string | Buffer): boolean => {
+const isUrl = (file: string): file is string => {
27
if (typeof file !== 'string') return false;
28
try {
29
const url = new URL(file);
0 commit comments