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.1 to 5.0.0

dist/index.d.ts.map

1

dist/index.d.ts

@@ -16,1 +16,2 @@ /// <reference types="node" />

export default dataUriToBuffer;
//# sourceMappingURL=index.d.ts.map

8

dist/index.js

@@ -0,1 +1,4 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.dataUriToBuffer = void 0;
/**

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

*/
export function dataUriToBuffer(uri) {
function dataUriToBuffer(uri) {
if (!/^data:/i.test(uri)) {

@@ -53,3 +56,4 @@ throw new TypeError('`uri` does not appear to be a Data URI (must begin with "data:")');

}
export default dataUriToBuffer;
exports.dataUriToBuffer = dataUriToBuffer;
exports.default = dataUriToBuffer;
//# sourceMappingURL=index.js.map
{
"name": "data-uri-to-buffer",
"version": "4.0.1",
"version": "5.0.0",
"description": "Generate a Buffer instance from a Data URI string",
"type": "module",
"exports": "./dist/index.js",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"files": [
"dist",
"src"
"dist"
],
"scripts": {
"build": "tsc",
"test": "jest",
"prepublishOnly": "npm run build"
"test": "jest --env node --verbose --bail",
"lint": "eslint . --ext .ts",
"pack": "node ../../scripts/pack.mjs"
},
"repository": {
"type": "git",
"url": "git://github.com/TooTallNate/node-data-uri-to-buffer.git"
"url": "https://github.com/TooTallNate/proxy-agents.git",
"directory": "packages/data-uri-to-buffer"
},
"engines": {
"node": ">= 12"
"node": ">= 14"
},

@@ -37,27 +36,10 @@ "keywords": [

"license": "MIT",
"bugs": {
"url": "https://github.com/TooTallNate/node-data-uri-to-buffer/issues"
},
"homepage": "https://github.com/TooTallNate/node-data-uri-to-buffer",
"devDependencies": {
"@types/jest": "^27.0.2",
"@types/node": "^12.20.36",
"jest": "^27.3.1",
"ts-jest": "^27.0.7",
"typescript": "^4.4.4"
},
"jest": {
"preset": "ts-jest",
"globals": {
"ts-jest": {
"diagnostics": false,
"isolatedModules": true
}
},
"verbose": false,
"testEnvironment": "node",
"testMatch": [
"<rootDir>/test/**/*.test.ts"
]
"@types/node": "^14.18.43",
"jest": "^29.5.0",
"ts-jest": "^29.1.0",
"tsconfig": "workspace:*",
"typescript": "^5.0.4"
}
}
data-uri-to-buffer
==================
### Generate a Buffer instance from a [Data URI][rfc] string
[![Build Status](https://travis-ci.org/TooTallNate/node-data-uri-to-buffer.svg?branch=master)](https://travis-ci.org/TooTallNate/node-data-uri-to-buffer)

@@ -9,13 +8,2 @@ This module accepts a ["data" URI][rfc] String of data, and returns a

Installation
------------
Install with `npm`:
``` bash
$ npm install data-uri-to-buffer
```
Example

@@ -25,3 +13,3 @@ -------

``` js
import dataUriToBuffer from 'data-uri-to-buffer';
import { dataUriToBuffer } from 'data-uri-to-buffer';

@@ -28,0 +16,0 @@ // plain-text data is supported

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