metascraper-description 5.42.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.
Files changed (2) hide show
  1. package/package.json +3 -3
  2. package/src/index.d.ts +30 -0
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "metascraper-description",
3
3
  "description": "Get description property from HTML markup",
4
4
  "homepage": "https://nicedoc.io/microlinkhq/metascraper/packages/metascraper-description",
5
- "version": "5.42.0",
5
+ "version": "5.42.2",
6
6
  "main": "src/index.js",
7
7
  "types": "src/index.d.ts",
8
8
  "author": {
@@ -32,11 +32,11 @@
32
32
  "node": ">= 16"
33
33
  },
34
34
  "files": [
35
- "index.js"
35
+ "src"
36
36
  ],
37
37
  "scripts": {
38
38
  "test": "NODE_PATH=.. TZ=UTC ava --timeout 15s"
39
39
  },
40
40
  "license": "MIT",
41
- "gitHead": "c0b0686683249610f570c8f58ef4f6b77c824d0d"
41
+ "gitHead": "f30814fcbc6b03d7a7d4f2f96654ad8f449e4102"
42
42
  }
package/src/index.d.ts ADDED
@@ -0,0 +1,30 @@
1
+ type Options = {
2
+ /**
3
+ * The maximum length of the description.
4
+ * @default Number.MAX_SAFE_INTEGER
5
+ */
6
+ truncateLength?: number,
7
+ /**
8
+ * The string to append if the description is truncated.
9
+ * @default '…'
10
+ */
11
+ ellipsis?: string,
12
+ /**
13
+ * Whether to remove the byline from the description.
14
+ * @default false
15
+ */
16
+ removeBy?: boolean,
17
+ /**
18
+ * Whether to remove the separator from the description.
19
+ * @default false
20
+ */
21
+ removeSeparator?: boolean,
22
+ /**
23
+ * Whether to capitalize the description.
24
+ * @default false
25
+ */
26
+ capitalize?: boolean
27
+ }
28
+
29
+ declare function rules(options?: Options): import('metascraper').Rules;
30
+ export = rules;