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

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

  • 1.3.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.2M
decreased by-53.15%
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 08 Aug 2017

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