@metascraper/helpers 5.46.5 → 5.46.11
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/index.js +8 -1
- package/package.json +6 -6
package/index.js
CHANGED
|
@@ -284,7 +284,14 @@ const url = (value, { url = '' } = {}) => {
|
|
|
284
284
|
if (isUrl(absoluteUrl)) return absoluteUrl
|
|
285
285
|
} catch (_) {}
|
|
286
286
|
|
|
287
|
-
|
|
287
|
+
let sanitizedValue = value
|
|
288
|
+
if (value.startsWith('data:')) {
|
|
289
|
+
const [header, data] = value.split(',')
|
|
290
|
+
const cleanData = data.replace(/\s+/g, '')
|
|
291
|
+
sanitizedValue = `${header},${cleanData}`
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
return isUri(sanitizedValue) ? sanitizedValue : undefined
|
|
288
295
|
}
|
|
289
296
|
|
|
290
297
|
const getISODate = date =>
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@metascraper/helpers",
|
|
3
3
|
"description": "Collection of helper functions used by metascraper",
|
|
4
4
|
"homepage": "https://github.com/microlinkhq/metascraper/packages/metascraper-helpers",
|
|
5
|
-
"version": "5.46.
|
|
5
|
+
"version": "5.46.11",
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"author": {
|
|
8
8
|
"email": "hello@microlink.io",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
],
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"audio-extensions": "0.0.0",
|
|
26
|
-
"chrono-node": "~2.7.
|
|
26
|
+
"chrono-node": "~2.7.9",
|
|
27
27
|
"condense-whitespace": "~2.0.0",
|
|
28
28
|
"data-uri-utils": "~1.0.8",
|
|
29
29
|
"debug-logfmt": "~1.2.3",
|
|
@@ -32,10 +32,10 @@
|
|
|
32
32
|
"has-values": "~2.0.1",
|
|
33
33
|
"image-extensions": "~1.1.0",
|
|
34
34
|
"is-relative-url": "~3.0.0",
|
|
35
|
-
"is-uri": "~1.2.
|
|
35
|
+
"is-uri": "~1.2.7",
|
|
36
36
|
"iso-639-3": "~2.2.0",
|
|
37
37
|
"isostring": "0.0.1",
|
|
38
|
-
"jsdom": "~
|
|
38
|
+
"jsdom": "~26.0.0",
|
|
39
39
|
"lodash": "~4.17.21",
|
|
40
40
|
"memoize-one": "~6.0.0",
|
|
41
41
|
"microsoft-capitalize": "~1.0.5",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"normalize-url": "~6.1.0",
|
|
44
44
|
"re2": "~1.21.4",
|
|
45
45
|
"smartquotes": "~2.3.2",
|
|
46
|
-
"tldts": "~6.1.
|
|
46
|
+
"tldts": "~6.1.85",
|
|
47
47
|
"url-regex-safe": "~4.0.0",
|
|
48
48
|
"video-extensions": "1"
|
|
49
49
|
},
|
|
@@ -64,5 +64,5 @@
|
|
|
64
64
|
"publishConfig": {
|
|
65
65
|
"access": "public"
|
|
66
66
|
},
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "12e55506648d4485be3bdee36334040610760257"
|
|
68
68
|
}
|