Socket
Socket
Sign inDemoInstall

parse-data-url

Package Overview
Dependencies
1
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.3 to 0.1.4

6

CHANGELOG.md
<a name="0.1.4"></a>
### 0.1.4 (2016-10-22)
* update `valid-data-url` package version, accept types with a `.` character
<a name="0.1.3"></a>

@@ -3,0 +9,0 @@ ### 0.1.3 (2016-10-21)

4

package.json
{
"name": "parse-data-url",
"version": "0.1.3",
"version": "0.1.4",
"description": "Parse data URL string",

@@ -33,3 +33,3 @@ "main": "index.js",

"dependencies": {
"valid-data-url": "^0.1.2"
"valid-data-url": "^0.1.3"
},

@@ -36,0 +36,0 @@ "devDependencies": {

@@ -62,2 +62,11 @@ /* globals describe, it */

it('parse data with media types that contain .', function () {
parsed = parseDataUrl('data:application/vnd.ms-excel;base64,PGh0bWw%2BPC9odG1sPg%3D%3D');
expect(parsed).to.be.an('object');
expect(parsed.mediaType).to.equal('application/vnd.ms-excel');
expect(parsed.base64).to.be.true;
expect(parsed.charset).to.be.undefined;
expect(parsed.data).to.equal('PGh0bWw%2BPC9odG1sPg%3D%3D');
});
it('parse data with complex media type and charset', function () {

@@ -64,0 +73,0 @@ parsed = parseDataUrl('data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22100%22%20height%3D%22100%22%3E%3Crect%20fill%3D%22%2300B1FF%22%20width%3D%22100%22%20height%3D%22100%22%2F%3E%3C%2Fsvg%3E');

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