Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@azure/storage-blob

Package Overview
Dependencies
Maintainers
4
Versions
413
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@azure/storage-blob - npm Package Compare versions

Comparing version 12.0.1-dev.20191203.1 to 12.0.1

6

package.json
{
"name": "@azure/storage-blob",
"sdk-type": "client",
"version": "12.0.1-dev.20191203.1",
"version": "12.0.1",
"description": "Microsoft Azure Storage SDK for JavaScript - Blob",

@@ -85,3 +85,3 @@ "main": "./dist/index.js",

"@azure/core-paging": "^1.0.0",
"@azure/core-tracing": "^1.0.0-dev",
"@azure/core-tracing": "1.0.0-preview.7",
"@azure/logger": "^1.0.0",

@@ -93,3 +93,3 @@ "@opentelemetry/types": "^0.2.0",

"devDependencies": {
"@azure/test-utils-recorder": "^1.0.0-dev",
"@azure/test-utils-recorder": "^1.0.0",
"@azure/identity": "^1.0.0",

@@ -96,0 +96,0 @@ "@microsoft/api-extractor": "^7.5.4",

@@ -348,3 +348,3 @@ # Azure Storage Blob client library for JavaScript

const containerClient = blobServiceClient.getContainerClient(containerName);
let i = 1;

@@ -407,19 +407,18 @@ let iter = await containerClient.listBlobsFlat();

### Download a blob and convert it to a string (Browsers)
### Download a blob and convert it to a string (Browsers).
Please refer to the [JavaScript Bundle](#javascript-bundle) section for more information on using this library in the browser.
```javascript
const { DefaultAzureCredential } = require("@azure/identity");
const { BlobServiceClient } = require("@azure/storage-blob");
const account = "<account>";
const defaultAzureCredential = new DefaultAzureCredential();
const account = "<account name>";
const sas = "<service Shared Access Signature Token>";
const containerName = "<container name>";
const blobName = "<blob name>"
const blobServiceClient = new BlobServiceClient(
`https://${account}.blob.core.windows.net`,
defaultAzureCredential
`https://${account}.blob.core.windows.net${sas}`
);
const containerName = "<container name>";
const blobName = "<blob name>"
async function main() {

@@ -439,7 +438,7 @@ const containerClient = blobServiceClient.getContainerClient(containerName);

// [Browsers only] A helper method used to convert a browser Blob into string.
async function blobToString(blob: Blob): Promise<string> {
async function blobToString(blob){
const fileReader = new FileReader();
return new Promise<string>((resolve, reject) => {
fileReader.onloadend = (ev: any) => {
resolve(ev.target!.result);
return new Promise((resolve, reject) => {
fileReader.onloadend = (ev) => {
resolve(ev.target.result);
};

@@ -446,0 +445,0 @@ fileReader.onerror = reject;

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc