@metascraper/helpers 5.29.7 → 5.29.13
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 +4 -2
- package/package.json +4 -4
package/index.js
CHANGED
|
@@ -237,7 +237,7 @@ const author = (value, opts) =>
|
|
|
237
237
|
isAuthor(value) ? getAuthor(value, opts) : undefined
|
|
238
238
|
|
|
239
239
|
const url = (value, { url = '' } = {}) => {
|
|
240
|
-
if (isEmpty(value)) return
|
|
240
|
+
if (!isString(value) || isEmpty(value)) return
|
|
241
241
|
|
|
242
242
|
try {
|
|
243
243
|
const absoluteUrl = normalizeUrl(url, value)
|
|
@@ -344,7 +344,9 @@ const $jsonld = propName => $ => {
|
|
|
344
344
|
|
|
345
345
|
const image = (value, opts) => {
|
|
346
346
|
const urlValue = url(value, opts)
|
|
347
|
-
return
|
|
347
|
+
return urlValue !== undefined &&
|
|
348
|
+
!isAudioUrl(urlValue, opts) &&
|
|
349
|
+
!isVideoUrl(urlValue, opts)
|
|
348
350
|
? urlValue
|
|
349
351
|
: undefined
|
|
350
352
|
}
|
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://nicedoc.io/microlinkhq/metascraper/packages/metascraper-helpers",
|
|
5
|
-
"version": "5.29.
|
|
5
|
+
"version": "5.29.13",
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"author": {
|
|
8
8
|
"email": "hello@microlink.io",
|
|
@@ -33,13 +33,13 @@
|
|
|
33
33
|
"is-uri": "~1.2.4",
|
|
34
34
|
"iso-639-3": "~2.2.0",
|
|
35
35
|
"isostring": "0.0.1",
|
|
36
|
-
"jsdom": "~
|
|
36
|
+
"jsdom": "~20.0.0",
|
|
37
37
|
"lodash": "~4.17.21",
|
|
38
38
|
"memoize-one": "~6.0.0",
|
|
39
39
|
"microsoft-capitalize": "~1.0.5",
|
|
40
40
|
"mime-types": "~2.1.35",
|
|
41
41
|
"normalize-url": "~6.1.0",
|
|
42
|
-
"re2": "~1.17.
|
|
42
|
+
"re2": "~1.17.7",
|
|
43
43
|
"smartquotes": "~2.3.2",
|
|
44
44
|
"url-regex-safe": "~3.0.0",
|
|
45
45
|
"video-extensions": "~1.2.0"
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"publishConfig": {
|
|
62
62
|
"access": "public"
|
|
63
63
|
},
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "f90dafabbd8435e6dc8afcad15a12ed2452d5ed3"
|
|
65
65
|
}
|