Socket
Socket
Sign inDemoInstall

blob-util

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

blob-util

Utilities for working with Blob objects in the browser


Version published
Weekly downloads
3.9M
decreased by-18.63%
Maintainers
1
Weekly downloads
 
Created

What is blob-util?

The blob-util npm package is a collection of utilities for working with Blob objects in JavaScript. It simplifies common tasks such as converting blobs to base64 strings, creating blobs from various data types, and more. This package is particularly useful when dealing with binary data in web applications, making it easier to handle file uploads, image processing, and other blob-related operations.

What are blob-util's main functionalities?

Convert Blob to Base64 String

This feature allows you to convert a Blob object into a base64 encoded string. This is useful for uploading files as base64 encoded strings or displaying images directly in the browser using the base64 string.

blobUtil.blobToBase64String(blob).then(function (base64String) {
  // use your base64 string here
}).catch(function (err) {
  // handle any errors
});

Create Blob from Base64 String

This feature enables the creation of a Blob object from a base64 encoded string. It's useful for retrieving images or files that are stored as base64 strings and converting them back into a usable Blob format.

blobUtil.base64StringToBlob(base64String).then(function (blob) {
  // use your blob here
}).catch(function (err) {
  // handle any errors
});

Convert Blob to Binary String

This functionality converts a Blob into a binary string. This can be useful for processing or analyzing the binary data of files directly in JavaScript.

blobUtil.blobToBinaryString(blob).then(function (binaryString) {
  // use your binary string here
}).catch(function (err) {
  // handle any errors
});

Other packages similar to blob-util

Keywords

FAQs

Package last updated on 21 May 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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