Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

data-urls

Package Overview
Dependencies
Maintainers
6
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

data-urls - npm Package Compare versions

Comparing version 1.0.1 to 1.1.0

11

package.json

@@ -12,3 +12,3 @@ {

],
"version": "1.0.1",
"version": "1.1.0",
"author": "Domenic Denicola <d@domenic.me> (https://domenic.me/)",

@@ -28,4 +28,4 @@ "license": "MIT",

"devDependencies": {
"eslint": "^5.4.0",
"jest": "^23.5.0",
"eslint": "^5.7.0",
"jest": "^23.6.0",
"request": "^2.88.0"

@@ -42,2 +42,5 @@ },

"<rootDir>/test/**/*.js"
],
"coveragePathIgnorePatterns": [
"<rootDir>/node_modules/(?!(abab/lib/atob.js))"
]

@@ -47,5 +50,5 @@ },

"abab": "^2.0.0",
"whatwg-mimetype": "^2.1.0",
"whatwg-mimetype": "^2.2.0",
"whatwg-url": "^7.0.0"
}
}

@@ -35,3 +35,3 @@ # Parse `data:` URLs

Because Node.js's `Buffer.prototype.toString()` assumes a UTF-8 encoding, simply doing `dataURL.body.toString()` may not work correctly if the `data:` URLs contents were not originally written in UTF-8. This includes if the encoding is "US-ASCII", [aka windows-1252](https://encoding.spec.whatwg.org/#names-and-labels), which is notable for being the default in many cases.
Because Node.js's `Buffer.prototype.toString()` assumes a UTF-8 encoding, simply doing `dataURL.body.toString()` may not work correctly if the `data:` URL's contents were not originally written in UTF-8. This includes if the encoding is "US-ASCII", [aka windows-1252](https://encoding.spec.whatwg.org/#names-and-labels), which is notable for being the default in many cases.

@@ -38,0 +38,0 @@ A more complete decoding example would use the [whatwg-encoding](https://www.npmjs.com/package/whatwg-encoding) package as follows:

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc