Skip to content

Commit 52c32a8

Browse files
fix linter errors
1 parent 6311c15 commit 52c32a8

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

src/orkes/request/request.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,27 +23,27 @@ const isStringWithValue = (value: unknown): value is string => {
2323
return isString(value) && value !== "";
2424
};
2525

26-
const isBlob = (value: any): value is Blob => {
26+
const isBlob = (value: unknown): value is Blob => {
2727
return (
28-
typeof value === "object" &&
29-
typeof value.type === "string" &&
30-
typeof value.stream === "function" &&
31-
typeof value.arrayBuffer === "function" &&
28+
typeof value === "object" && value !== null &&
29+
typeof (value as Blob).type === "string" &&
30+
typeof (value as Blob).stream === "function" &&
31+
typeof (value as Blob).arrayBuffer === "function" &&
3232
typeof value.constructor === "function" &&
3333
typeof value.constructor.name === "string" &&
3434
/^(Blob|File)$/.test(value.constructor.name) &&
35-
/^(Blob|File)$/.test(value[Symbol.toStringTag])
35+
/^(Blob|File)$/.test((value as { [Symbol.toStringTag]: string })[Symbol.toStringTag])
3636
);
3737
};
3838

39-
const isFormData = (value: any): value is FormData => {
39+
const isFormData = (value: unknown): value is FormData => {
4040
return value instanceof FormData;
4141
};
4242

4343
const base64 = (str: string): string => {
4444
try {
4545
return btoa(str);
46-
} catch (err) {
46+
} catch {
4747
return Buffer.from(str).toString("base64");
4848
}
4949
};

0 commit comments

Comments
 (0)