@azure/storage-blob 12.26.0-alpha.20250311.1 → 12.26.0-alpha.20250314.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -451,7 +451,7 @@ async function main() {
451
451
  return new Promise((resolve, reject) => {
452
452
  const chunks = [];
453
453
  readableStream.on("data", (data) => {
454
- chunks.push(data instanceof Buffer ? data : Buffer.from(data));
454
+ chunks.push(typeof data === "string" ? Buffer.from(data) : data);
455
455
  });
456
456
  readableStream.on("end", () => {
457
457
  resolve(Buffer.concat(chunks));
package/dist/index.js CHANGED
@@ -19562,16 +19562,16 @@ class BlobClient extends StorageClient {
19562
19562
  * console.log("Downloaded blob content:", downloaded.toString());
19563
19563
  *
19564
19564
  * async function streamToBuffer(readableStream) {
19565
- * return new Promise((resolve, reject) => {
19566
- * const chunks = [];
19567
- * readableStream.on("data", (data) => {
19568
- * chunks.push(data instanceof Buffer ? data : Buffer.from(data));
19569
- * });
19570
- * readableStream.on("end", () => {
19571
- * resolve(Buffer.concat(chunks));
19572
- * });
19573
- * readableStream.on("error", reject);
19574
- * });
19565
+ * return new Promise((resolve, reject) => {
19566
+ * const chunks = [];
19567
+ * readableStream.on("data", (data) => {
19568
+ * chunks.push(typeof data === "string" ? Buffer.from(data) : data);
19569
+ * });
19570
+ * readableStream.on("end", () => {
19571
+ * resolve(Buffer.concat(chunks));
19572
+ * });
19573
+ * readableStream.on("error", reject);
19574
+ * });
19575
19575
  * }
19576
19576
  * ```
19577
19577
  *
@@ -20767,7 +20767,7 @@ class BlockBlobClient extends BlobClient {
20767
20767
  * return new Promise((resolve, reject) => {
20768
20768
  * const chunks = [];
20769
20769
  * readableStream.on("data", (data) => {
20770
- * chunks.push(data instanceof Buffer ? data : Buffer.from(data));
20770
+ * chunks.push(typeof data === "string" ? Buffer.from(data) : data);
20771
20771
  * });
20772
20772
  * readableStream.on("end", () => {
20773
20773
  * resolve(Buffer.concat(chunks));