🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more

data-uri-to-buffer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
p

data-uri-to-buffer

Create an ArrayBuffer instance from a Data URI string

6.0.2
latest
100

Supply Chain Security

100

Vulnerability

86

Quality

76

Maintenance

100

License

Version published
Maintainers
1
Created
Issues
38

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

FAQs

Package last updated on 12 Feb 2024

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