MCPcopy Create free account
hub / github.com/Kong/httpsnippet / isBlob

Function isBlob

src/helpers/form-data.ts:36–42  ·  view source on GitHub ↗
(object: any)

Source from the content-addressed store, hash-verified

34const NAME = Symbol.toStringTag;
35
36export const isBlob = (object: any) =>
37 typeof object === 'object' &&
38 typeof object.arrayBuffer === 'function' &&
39 typeof object.type === 'string' &&
40 typeof object.stream === 'function' &&
41 typeof object.constructor === 'function' &&
42 /^(Blob|File)$/.test(object[NAME]);
43
44const getFooter = (boundary: string) => `${dashes}${boundary}${dashes}${carriage.repeat(2)}`;
45

Callers 3

HTTPSnippetClass · 0.90
getHeaderFunction · 0.85
form-data.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…