Gathering detailed insights and metrics for data-uri-to-buffer
Gathering detailed insights and metrics for data-uri-to-buffer
Gathering detailed insights and metrics for data-uri-to-buffer
Gathering detailed insights and metrics for data-uri-to-buffer
string-to-arraybuffer
Convert base64/datauri/plain string to ArrayBuffer
@esm2cjs/data-uri-to-buffer
Generate a Buffer instance from a Data URI string. This is a fork of TooTallNate/node-data-uri-to-buffer, but with CommonJS support.
npm-watermark
watermark ================== ### 水印添加 [](https://travis-ci.org/TooTallNate/node-data-uri-to-buffer)
node-qrcode-generator
A lightweight and versatile Node.js package for generating QR codes from URLs. It offers customizable options and a clean API for effortless integration into your projects.
npm install data-uri-to-buffer
Typescript
Module System
Min. Node Version
Node Version
NPM Version
99.7
Supply Chain
85.8
Quality
75.9
Maintenance
100
Vulnerability
100
License
pac-proxy-agent@7.2.0
Updated on Feb 18, 2025
agent-base@7.1.3
Updated on Dec 08, 2024
socks-proxy-agent@8.0.5
Updated on Dec 07, 2024
proxy-agent@6.5.0
Updated on Dec 07, 2024
pac-proxy-agent@7.1.0
Updated on Dec 07, 2024
https-proxy-agent@7.0.6
Updated on Dec 07, 2024
TypeScript (93.57%)
JavaScript (6.43%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
1,059 Stars
298 Commits
258 Forks
19 Watchers
3 Branches
40 Contributors
Updated on Jun 29, 2025
Minified
Minified + Gzipped
Latest Version
6.0.2
Package Id
data-uri-to-buffer@6.0.2
Unpacked Size
16.41 kB
Size
4.92 kB
File Count
16
NPM Version
10.2.4
Node Version
20.11.0
Published on
Feb 12, 2024
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
6
This module accepts a "data" URI String of data, and returns
an ArrayBuffer
instance with the decoded data.
This module is intended to work on a large variety of JavaScript runtimes, including Node.js and web browsers.
1import { dataUriToBuffer } from 'data-uri-to-buffer'; 2 3// plain-text data is supported 4let uri = 'data:,Hello%2C%20World!'; 5let parsed = dataUriToBuffer(uri); 6console.log(new TextDecoder().decode(parsed.buffer)); 7// 'Hello, World!' 8 9// base64-encoded data is supported 10uri = 'data:text/plain;base64,SGVsbG8sIFdvcmxkIQ%3D%3D'; 11parsed = dataUriToBuffer(uri); 12console.log(new TextDecoder().decode(parsed.buffer)); 13// 'Hello, World!'
1export interface ParsedDataURI { 2 type: string; 3 typeFull: string; 4 charset: string; 5 buffer: ArrayBuffer; 6}
The type
property gets set to the main type portion of
the "mediatype" portion of the "data" URI, or defaults to "text/plain"
if not
specified.
The typeFull
property gets set to the entire
"mediatype" portion of the "data" URI (including all parameters), or defaults
to "text/plain;charset=US-ASCII"
if not specified.
The charset
property gets set to the Charset portion of
the "mediatype" portion of the "data" URI, or defaults to "US-ASCII"
if the
entire type is not specified, or defaults to ""
otherwise.
Note: If only the main type is specified but not the charset, e.g.
"data:text/plain,abc"
, the charset is set to the empty string. The spec only
defaults to US-ASCII as charset if the entire type is not specified.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
Found 13/23 approved changesets -- score normalized to 5
Reason
9 existing vulnerabilities detected
Details
Reason
0 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
security policy file not detected
Details
Reason
license file not detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-06-23
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More