metascraper-author 5.56.2 → 5.58.5

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.
Files changed (2) hide show
  1. package/package.json +3 -3
  2. package/src/index.js +3 -3
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "metascraper-author",
3
3
  "description": "Metascraper rule to extract the author from HTML using Open Graph, JSON-LD, and fallback selectors.",
4
4
  "homepage": "https://metascraper.js.org",
5
- "version": "5.56.2",
5
+ "version": "5.58.5",
6
6
  "types": "src/index.d.ts",
7
7
  "main": "src/index.js",
8
8
  "author": {
@@ -30,7 +30,7 @@
30
30
  "scraper"
31
31
  ],
32
32
  "dependencies": {
33
- "@metascraper/helpers": "5.56.2"
33
+ "@metascraper/helpers": "5.58.4"
34
34
  },
35
35
  "devDependencies": {
36
36
  "ava": "8"
@@ -45,5 +45,5 @@
45
45
  "test": "NODE_PATH=.. TZ=UTC ava --timeout 15s"
46
46
  },
47
47
  "license": "MIT",
48
- "gitHead": "63168a1c6ab9fa67552a13fd9e4a60ad4c10f953"
48
+ "gitHead": "82d52338c5c37875c19986310966698808c6aad9"
49
49
  }
package/src/index.js CHANGED
@@ -20,9 +20,9 @@ const toAuthor = toRule(author)
20
20
  * @return {Function} stricter
21
21
  */
22
22
 
23
- const strict = rule => $ => {
24
- const value = rule($)
25
- return REGEX_STRICT.test(value) && value
23
+ const strict = rule => async $ => {
24
+ const value = await rule($)
25
+ return REGEX_STRICT.test(value) ? value : undefined
26
26
  }
27
27
 
28
28
  module.exports = () => {