Method
responseToStoreType
(
response: Response,
storetype?: StoreType,
)
Source from the content-addressed store, hash-verified
| 754 | } |
| 755 | |
| 756 | private async responseToStoreType( |
| 757 | response: Response, |
| 758 | storetype?: StoreType, |
| 759 | ): Promise<any> { |
| 760 | if (storetype === undefined) { |
| 761 | return response; |
| 762 | } |
| 763 | const format = storetype.toLowerCase(); |
| 764 | if (format === "json") { |
| 765 | return response.json(); |
| 766 | } |
| 767 | if (format === "arraybuffer") { |
| 768 | return response.arrayBuffer(); |
| 769 | } |
| 770 | return response; |
| 771 | } |
| 772 | } |
| 773 | |
| 774 | function normalizeCacheType(cacheType?: string): ArtifactCacheType { |
Tested by
no test coverage detected