@metascraper/helpers 5.35.1 → 5.35.2
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 +5 -0
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -163,6 +163,10 @@ const titleize = (src, opts = {}) => {
|
|
|
163
163
|
return title
|
|
164
164
|
}
|
|
165
165
|
|
|
166
|
+
const $twitter = ($, selector) =>
|
|
167
|
+
$(`meta[name="${selector}"]`).attr('content') ||
|
|
168
|
+
$(`meta[property="${selector}"]`).attr('content')
|
|
169
|
+
|
|
166
170
|
const $filter = ($, matchedEl, fn = $filter.fn) => {
|
|
167
171
|
let matched
|
|
168
172
|
|
|
@@ -466,6 +470,7 @@ const loadIframe = (url, $, { timeout = 5000 } = {}) =>
|
|
|
466
470
|
module.exports = {
|
|
467
471
|
$filter,
|
|
468
472
|
$jsonld,
|
|
473
|
+
$twitter,
|
|
469
474
|
absoluteUrl,
|
|
470
475
|
audio,
|
|
471
476
|
audioExtensions,
|
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.35.
|
|
5
|
+
"version": "5.35.2",
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"author": {
|
|
8
8
|
"email": "hello@microlink.io",
|
|
@@ -62,5 +62,5 @@
|
|
|
62
62
|
"publishConfig": {
|
|
63
63
|
"access": "public"
|
|
64
64
|
},
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "ba30cbe6b6d649f845131278f65504e9c63db622"
|
|
66
66
|
}
|