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

data-uri-to-buffer

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

data-uri-to-buffer

Generate a Buffer instance from a Data URI string

  • 5.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
17M
increased by3.52%
Maintainers
1
Weekly downloads
 
Created

What is data-uri-to-buffer?

The data-uri-to-buffer npm package is designed to convert Data URIs into Buffers. This is particularly useful when dealing with inline data within web applications, where you might need to handle the data as a binary stream for file operations, uploads, or other processing tasks.

What are data-uri-to-buffer's main functionalities?

Convert Data URI to Buffer

This feature allows you to convert a Data URI string into a Node.js Buffer. The resulting Buffer can then be used for various binary data operations.

const dataUriToBuffer = require('data-uri-to-buffer');
const dataUri = 'data:text/plain;base64,SGVsbG8sIFdvcmxkIQ==';
const buffer = dataUriToBuffer(dataUri);
console.log(buffer.toString()); // 'Hello, World!'
0

Keywords

FAQs

Package last updated on 04 May 2023

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