data-uri-to-buffer
npmv8.0.0Create an ArrayBuffer instance from a Data URI string
Safe to adopt
Yes — data-uri-to-buffer scores well across adoption, maintenance, weight, supply chain, and licensing. No download data reported for this package yet. Last published 162 days ago. 2 releases in the last 2 years.
- ?Adoption: grade ?, Not reported by this registry.
No download data reported for this package yet.
- BMaintenance: grade B, Good.
Last published 162 days ago. 2 releases in the last 2 years.
- AWeight: grade A, Excellent.
Zero runtime dependencies, about 14 KB installed.
- BSupply chain: grade B, Good.
This package has a single maintainer (bus factor of 1).
- ALicense: grade A, Excellent.
MIT — permissive, with no copyleft found in the dependency tree.
Grades are computed deterministically from registry metadata collected by PackageGraph — downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.
Install cost
What you actually take on by adding data-uri-to-buffer to a project.
Runtime packages this one declares itself.
Distinct packages in the full runtime tree, deduplicated the way a package manager would.
Unpacked size of this package plus its entire runtime tree.
Longest resolved dependency chain below this package.
Compatibility
- Node.js
- node >= 20
- Module format
- ESM only
- TypeScript
- No bundled types
- Install scripts
- None
Quick start
A usage example from the data-uri-to-buffer README.
import { dataUriToBuffer } from 'data-uri-to-buffer';
// plain-text data is supported
let uri = 'data:,Hello%2C%20World!';
let parsed = dataUriToBuffer(uri);
console.log(new TextDecoder().decode(parsed.buffer));
// 'Hello, World!'
// base64-encoded data is supported
uri = 'data:text/plain;base64,SGVsbG8sIFdvcmxkIQ%3D%3D';
parsed = dataUriToBuffer(uri);
console.log(new TextDecoder().decode(parsed.buffer));
// 'Hello, World!'data-uri-to-buffer vs the alternatives
Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.
| Package | Weekly downloads | Dependents | License | Last release |
|---|---|---|---|---|
| data-uri-to-bufferthis page | 0 | 1 | MIT | 5 months ago |
| @xtuc/ieee754 | 0 | 1 | BSD-3-Clause | 1 day ago |
| color-convert | 299.6M | 1 | MIT | 1 day ago |
| @jridgewell/resolve-uri | 166.3M | 1 | MIT | 1 day ago |
| camelcase | 95.7M | 2 | MIT | 1 day ago |
| internal-slot | 79.2M | 1 | MIT | 1 day ago |
Dependencies
Declared by data-uri-to-buffer v8.0.0. Runtime dependencies are installed with the package; dev dependencies are not.
Dev (3)
Used by
Popular packages that depend on data-uri-to-buffer.
Relationship graph
Dependencies (left) and dependents (right) of data-uri-to-buffer.
Frequently installed together
Blob & File implementation in Node.js, originally from node-fetch.
HTML5 `FormData` for Browsers and Node.
A library to create readable "multipart/form-data" streams. Can be used to submit forms and file uploads to other web applications.
BDD/TDD assertion library for node.js and the browser. Test framework agnostic.
An implementation of WHATWG AbortController interface.
Release history
2 releases in the last two years, typically about 135 days apart.
| Version | Published | Size | License |
|---|---|---|---|
| 8.0.0latest | 5 months ago | 14 KB | MIT |
| 7.0.0 | 6 months ago | 14 KB | MIT |
| 6.0.2 | 2 years ago | 16 KB | MIT |
| 6.0.1 | 2 years ago | 14 KB | MIT |
| 6.0.0 | 2 years ago | 14 KB | MIT |
| 5.0.1 | 3 years ago | 9.9 KB | MIT |
| 5.0.0 | 3 years ago | 9.9 KB | MIT |
| 4.0.1 | 3 years ago | 9.8 KB | MIT |
| 4.0.0 | 5 years ago | 26 KB | MIT |
| 3.0.1 | 6 years ago | 8.2 KB | MIT |
| 3.0.0 | 7 years ago | 22 KB | MIT |
| 2.0.2 | 7 years ago | 13 KB | MIT |
| 2.0.1 | 7 years ago | 13 KB | MIT |
| 2.0.0 | 9 years ago | — | MIT |
| 1.2.0 | 9 years ago | — | MIT |
Overview
data-uri-to-buffer is an npm package that create an ArrayBuffer instance from a Data URI string. It has 1 known dependents in the graph. The latest version is 8.0.0, released under the MIT license.
Who should use it
Teams working in the npm ecosystem who need create an ArrayBuffer instance from a Data URI string and value a focused solution.
When not to use it
Consider an alternative if you need to have first-class TypeScript types out of the box, or if a more actively-maintained option better fits your npm stack.
Pros
- Clear open-source license (MIT).
- Lean dependency tree (3 direct dependencies).
Cons
- No bundled TypeScript types (may require a separate @types package).
Auto-generated from collected registry metadata. No external claims are inferred.
Maintainers
Frequently asked questions
Should I use data-uri-to-buffer?
Yes — data-uri-to-buffer scores well across adoption, maintenance, weight, supply chain, and licensing. No download data reported for this package yet. Last published 162 days ago. 2 releases in the last 2 years.
How do I install data-uri-to-buffer?
Run `npm install data-uri-to-buffer` to add data-uri-to-buffer to your npm project.
What license is data-uri-to-buffer released under?
data-uri-to-buffer is distributed under the MIT license.
How popular is data-uri-to-buffer?
npm does not publish download counts. Within PackageGraph's crawl, 1 known packages depend on data-uri-to-buffer.
Is data-uri-to-buffer still maintained?
The most recent release of data-uri-to-buffer (v8.0.0) was published 5 months ago.
Does data-uri-to-buffer run install scripts?
No. data-uri-to-buffer does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.