UNPKG

1.74 kBSource Map (JSON)View Raw
1{"version":3,"file":"responseIterator.js","sourceRoot":"","sources":["../../../src/utilities/common/responseIterator.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,yBAAyB,EAAE,MAAM,UAAU,CAAC;AAErD,MAAM,UAAU,cAAc,CAAC,KAAU;IACvC,OAAO,CAAC,CAAE,KAAsB,CAAC,IAAI,CAAC;AACxC,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,KAAU;IACzC,OAAO,CAAC,CAAE,KAA6B,CAAC,SAAS,CAAC;AACpD,CAAC;AAED,MAAM,UAAU,uBAAuB,CACrC,KAAU;IAEV,OAAO,CAAC,CAAC,CACP,yBAAyB;QACxB,KAAoC,CAAC,MAAM,CAAC,aAAa,CAAC,CAC5D,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,KAAU;IACzC,OAAO,CAAC,CAAE,KAAc,CAAC,MAAM,CAAC;AAClC,CAAC;AAED,MAAM,UAAU,MAAM,CAAC,KAAU;IAC/B,OAAO,CAAC,CAAE,KAAc,CAAC,WAAW,CAAC;AACvC,CAAC;AAED,MAAM,UAAU,oBAAoB,CAAC,KAAU;IAC7C,OAAO,CAAC,CAAE,KAA4B,CAAC,IAAI,CAAC;AAC9C,CAAC","sourcesContent":["import { Response as NodeResponse } from \"node-fetch\";\nimport { Readable as NodeReadableStream } from \"stream\";\nimport { canUseAsyncIteratorSymbol } from \"./canUse\";\n\nexport function isNodeResponse(value: any): value is NodeResponse {\n return !!(value as NodeResponse).body;\n}\n\nexport function isReadableStream(value: any): value is ReadableStream<any> {\n return !!(value as ReadableStream<any>).getReader;\n}\n\nexport function isAsyncIterableIterator(\n value: any\n): value is AsyncIterableIterator<any> {\n return !!(\n canUseAsyncIteratorSymbol &&\n (value as AsyncIterableIterator<any>)[Symbol.asyncIterator]\n );\n}\n\nexport function isStreamableBlob(value: any): value is Blob {\n return !!(value as Blob).stream;\n}\n\nexport function isBlob(value: any): value is Blob {\n return !!(value as Blob).arrayBuffer;\n}\n\nexport function isNodeReadableStream(value: any): value is NodeReadableStream {\n return !!(value as NodeReadableStream).pipe;\n}\n"]}
\No newline at end of file