MCPcopy Create free account
hub / github.com/apache/tvm / responseToStoreType

Method responseToStoreType

web/src/artifact_cache.ts:672–687  ·  view source on GitHub ↗
(
    response: Response,
    storetype?: StoreType,
  )

Source from the content-addressed store, hash-verified

670 }
671
672 private async responseToStoreType(
673 response: Response,
674 storetype?: StoreType,
675 ): Promise<any> {
676 if (storetype === undefined) {
677 return response;
678 }
679 const format = storetype.toLowerCase();
680 if (format === "json") {
681 return response.json();
682 }
683 if (format === "arraybuffer") {
684 return response.arrayBuffer();
685 }
686 return response;
687 }
688}
689
690/**

Callers 1

readFromCacheMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected