MCPcopy Create free account
hub / github.com/ShaanCoding/makeread.me / isBlob

Function isBlob

frontend/openAPI/generated/core/request.ts:24–35  ·  view source on GitHub ↗
(value: any)

Source from the content-addressed store, hash-verified

22};
23
24export const isBlob = (value: any): value is Blob => {
25 return (
26 typeof value === 'object' &&
27 typeof value.type === 'string' &&
28 typeof value.stream === 'function' &&
29 typeof value.arrayBuffer === 'function' &&
30 typeof value.constructor === 'function' &&
31 typeof value.constructor.name === 'string' &&
32 /^(Blob|File)$/.test(value.constructor.name) &&
33 /^(Blob|File)$/.test(value[Symbol.toStringTag])
34 );
35};
36
37export const isFormData = (value: any): value is FormData => {
38 return value instanceof FormData;

Callers 3

processFunction · 0.85
getHeadersFunction · 0.85
getRequestBodyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected