metascraper-description 5.42.0 → 5.42.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.
- package/package.json +5 -5
- package/src/index.d.ts +30 -0
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "metascraper-description",
|
|
3
3
|
"description": "Get description property from HTML markup",
|
|
4
|
-
"homepage": "https://
|
|
5
|
-
"version": "5.42.
|
|
4
|
+
"homepage": "https://github.com/microlinkhq/metascraper/packages/metascraper-description",
|
|
5
|
+
"version": "5.42.5",
|
|
6
6
|
"main": "src/index.js",
|
|
7
7
|
"types": "src/index.d.ts",
|
|
8
8
|
"author": {
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"metascraper"
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@metascraper/helpers": "^5.
|
|
26
|
+
"@metascraper/helpers": "^5.42.5"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"ava": "5"
|
|
@@ -32,11 +32,11 @@
|
|
|
32
32
|
"node": ">= 16"
|
|
33
33
|
},
|
|
34
34
|
"files": [
|
|
35
|
-
"
|
|
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": "
|
|
41
|
+
"gitHead": "044f875812fff95bba404baad18c087eb154b7b0"
|
|
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;
|