šŸš€ Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.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

Create an ArrayBuffer instance from a Data URI string

6.0.1
Source
npm
Version published
Weekly downloads
0
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

data

FAQs

Package last updated on 30 Sep 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