Socket
Socket
Sign inDemoInstall

data-uri-to-buffer

Package Overview
Dependencies
0
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.0.0 to 4.0.1

2

dist/index.js

@@ -29,3 +29,3 @@ /**

}
else {
else if (meta[i]) {
typeFull += `;${meta[i]}`;

@@ -32,0 +32,0 @@ if (meta[i].indexOf('charset=') === 0) {

{
"name": "data-uri-to-buffer",
"version": "4.0.0",
"version": "4.0.1",
"description": "Generate a Buffer instance from a Data URI string",
"type": "module",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"exports": "./dist/index.js",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"files": [

@@ -41,8 +42,7 @@ "dist",

"devDependencies": {
"@types/es6-promisify": "^5.0.0",
"@types/mocha": "^9.0.0",
"@types/node": "^10.5.3",
"jest": "^27.2.2",
"ts-jest": "^27.0.5",
"typescript": "^4.4.3"
"@types/jest": "^27.0.2",
"@types/node": "^12.20.36",
"jest": "^27.3.1",
"ts-jest": "^27.0.7",
"typescript": "^4.4.4"
},

@@ -49,0 +49,0 @@ "jest": {

@@ -24,7 +24,7 @@ data-uri-to-buffer

``` js
var dataUriToBuffer = require('data-uri-to-buffer');
import dataUriToBuffer from 'data-uri-to-buffer';
// plain-text data is supported
var uri = 'data:,Hello%2C%20World!';
var decoded = dataUriToBuffer(uri);
let uri = 'data:,Hello%2C%20World!';
let decoded = dataUriToBuffer(uri);
console.log(decoded.toString());

@@ -31,0 +31,0 @@ // 'Hello, World!'

@@ -40,3 +40,3 @@ export interface MimeBuffer extends Buffer {

base64 = true;
} else {
} else if(meta[i]) {
typeFull += `;${ meta[i]}`;

@@ -43,0 +43,0 @@ if (meta[i].indexOf('charset=') === 0) {

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc