@azure/storage-blob
Version:
Microsoft Azure Storage SDK for JavaScript - Blob
1 lines • 1.07 kB
Source Map (JSON)
{"version":3,"file":"BatchUtils-browser.mjs","sourceRoot":"","sources":["../../src/BatchUtils-browser.mts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,MAAM,CAAC,KAAK,UAAU,aAAa,CACjC,aAA8C;IAE9C,MAAM,gBAAgB,GAAG,MAAM,aAAa,CAAC,QAAQ,CAAC;IACtD,IAAI,CAAC,gBAAgB,EAAE,CAAC;QACtB,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,MAAM,UAAU,GAAG,MAAM,gBAAgB,CAAC,IAAI,EAAE,CAAC;IACjD,OAAO,UAAU,CAAC;AACpB,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,GAAW;IACxC,OAAO,IAAI,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC;AAC9B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { ServiceSubmitBatchResponseModel } from \"./generatedModels.js\";\n\nexport async function getBodyAsText(\n batchResponse: ServiceSubmitBatchResponseModel,\n): Promise<string> {\n const blobBodyResponse = await batchResponse.blobBody;\n if (!blobBodyResponse) {\n return \"\";\n }\n const blobString = await blobBodyResponse.text();\n return blobString;\n}\n\nexport function utf8ByteLength(str: string): number {\n return new Blob([str]).size;\n}\n"]}