metascraper-manifest 5.40.0 → 5.42.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/package.json CHANGED
@@ -2,8 +2,9 @@
2
2
  "name": "metascraper-manifest",
3
3
  "description": "Metascraper integration for detecting PWA Web app manifest",
4
4
  "homepage": "https://nicedoc.io/microlinkhq/metascraper/packages/metascraper-manifest",
5
- "version": "5.40.0",
6
- "main": "index.js",
5
+ "version": "5.42.2",
6
+ "main": "src/index.js",
7
+ "types": "src/index.d.ts",
7
8
  "author": {
8
9
  "email": "hello@microlink.io",
9
10
  "name": "microlink.io",
@@ -37,11 +38,11 @@
37
38
  "node": ">= 16"
38
39
  },
39
40
  "files": [
40
- "index.js"
41
+ "src"
41
42
  ],
42
43
  "scripts": {
43
44
  "test": "NODE_PATH=.. TZ=UTC ava --timeout 15s"
44
45
  },
45
46
  "license": "MIT",
46
- "gitHead": "b4ec42d7dd7f1bae77c60d60dd8aed4bc5a44fa9"
47
+ "gitHead": "f30814fcbc6b03d7a7d4f2f96654ad8f449e4102"
47
48
  }
package/src/index.d.ts ADDED
@@ -0,0 +1,13 @@
1
+ type Options = {
2
+ /**
3
+ * https://github.com/sindresorhus/got#options
4
+ */
5
+ gotOpts?: import('got').Options,
6
+ /**
7
+ * https://github.com/microlinkhq/keyv/tree/master/packages/memoize#keyvoptions
8
+ */
9
+ keyvOpts?: import('@keyvhq/core').Options,
10
+ }
11
+
12
+ declare function rules(options?: Options): import('metascraper').Rules;
13
+ export = rules;
@@ -9,12 +9,7 @@ const memoize = require('@keyvhq/memoize')
9
9
  const got = require('got')
10
10
 
11
11
  const parseSize = str => {
12
- const parse = Number(
13
- chain(str)
14
- .split('x')
15
- .first()
16
- .value()
17
- )
12
+ const parse = Number(chain(str).split('x').first().value())
18
13
  return Number.isNaN(parse) ? 0 : parse
19
14
  }
20
15