data-uri-utils 1.0.14 → 1.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -1
- package/src/index.js +3 -1
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "data-uri-utils",
|
|
3
3
|
"description": "Parse, normalize, test, and convert data URIs to buffers — MIME type, base64, and charset helpers.",
|
|
4
4
|
"homepage": "https://github.com/Kikobeats/data-uri-utils",
|
|
5
|
-
"version": "1.0.
|
|
5
|
+
"version": "1.0.16",
|
|
6
6
|
"main": "src/index.js",
|
|
7
7
|
"author": {
|
|
8
8
|
"email": "josefrancisco.verdu@gmail.com",
|
|
@@ -53,6 +53,7 @@
|
|
|
53
53
|
"src"
|
|
54
54
|
],
|
|
55
55
|
"scripts": {
|
|
56
|
+
"benchmark": "node benchmark/index.js",
|
|
56
57
|
"clean": "rm -rf node_modules",
|
|
57
58
|
"contributors": "(npx git-authors-cli && npx finepack && git add package.json && git commit -m 'build: contributors' --no-verify) || true",
|
|
58
59
|
"coverage": "c8 report --reporter=text-lcov > coverage/lcov.info",
|
package/src/index.js
CHANGED
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
/* based on https://github.com/ragingwind/data-uri-regex/blob/master/index.js
|
|
4
4
|
the last update never published at npm */
|
|
5
|
-
|
|
5
|
+
// charset and base64 are independent parameters (RFC 2397); both may appear.
|
|
6
|
+
const regex = () =>
|
|
7
|
+
/^(data:)([\w/+-]*)((?:;charset=[\w-]+)?(?:;base64)?),(.*)/i
|
|
6
8
|
|
|
7
9
|
module.exports = {
|
|
8
10
|
normalize: input =>
|