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 3.0.0 to 3.0.1

2

dist/src/index.d.ts

@@ -1,2 +0,1 @@

/// <reference types="node" />
/**

@@ -9,2 +8,3 @@ * Returns a `Buffer` instance from the given data URI `uri`.

*/
/// <reference types="node" />
declare function dataUriToBuffer(uri: string): dataUriToBuffer.MimeBuffer;

@@ -11,0 +11,0 @@ declare namespace dataUriToBuffer {

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
const buffer_from_1 = __importDefault(require("buffer-from"));
/**

@@ -49,3 +45,3 @@ * Returns a `Buffer` instance from the given data URI `uri`.

const data = unescape(uri.substring(firstComma + 1));
const buffer = buffer_from_1.default(data, encoding);
const buffer = Buffer.from(data, encoding);
// set `.type` and `.typeFull` properties to MIME type

@@ -52,0 +48,0 @@ buffer.type = type;

{
"name": "data-uri-to-buffer",
"version": "3.0.0",
"version": "3.0.1",
"description": "Generate a Buffer instance from a Data URI string",

@@ -8,3 +8,3 @@ "main": "dist/src/index.js",

"files": [
"dist"
"dist/src"
],

@@ -41,3 +41,2 @@ "scripts": {

"devDependencies": {
"@types/buffer-from": "^1.1.0",
"@types/es6-promisify": "^5.0.0",

@@ -57,6 +56,3 @@ "@types/mocha": "^5.2.7",

"typescript": "^3.5.3"
},
"dependencies": {
"buffer-from": "^1.1.1"
}
}

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