parse-data-url
Advanced tools
Comparing version 0.1.3 to 0.1.4
<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) |
{ | ||
"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
10775
116
Updatedvalid-data-url@^0.1.3