defuddle 0.6.5 → 0.6.6
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/README.md +9 -8
- package/dist/types.d.ts +9 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -108,14 +108,15 @@ The core bundle is recommended for most use cases. It still handles math content
|
|
|
108
108
|
|
|
109
109
|
## Options
|
|
110
110
|
|
|
111
|
-
| Option | Type | Description
|
|
112
|
-
|
|
113
|
-
| `debug` | boolean | Enable debug logging
|
|
114
|
-
| `url` | string | URL of the page being parsed
|
|
115
|
-
| `markdown` | boolean | Convert `content` to Markdown
|
|
116
|
-
| `separateMarkdown` | boolean | Keep `content` as HTML and return `contentMarkdown` as Markdown
|
|
117
|
-
| `removeExactSelectors` | boolean |
|
|
118
|
-
| `removePartialSelectors` | boolean |
|
|
111
|
+
| Option | Type | Default | Description |
|
|
112
|
+
| ------------------------ | ------- | ------- | ------------------------------------------------------------------------- |
|
|
113
|
+
| `debug` | boolean | false | Enable debug logging |
|
|
114
|
+
| `url` | string | | URL of the page being parsed |
|
|
115
|
+
| `markdown` | boolean | false | Convert `content` to Markdown |
|
|
116
|
+
| `separateMarkdown` | boolean | false | Keep `content` as HTML and return `contentMarkdown` as Markdown |
|
|
117
|
+
| `removeExactSelectors` | boolean | true | Remove elements matching exact selectors like ads, social buttons, etc. |
|
|
118
|
+
| `removePartialSelectors` | boolean | true | Remove elements matching partial selectors like ads, social buttons, etc. |
|
|
119
|
+
| `removeImages` | boolean | false | Remove images. |
|
|
119
120
|
|
|
120
121
|
### Debug mode
|
|
121
122
|
|
package/dist/types.d.ts
CHANGED
|
@@ -25,6 +25,7 @@ export interface DefuddleResponse extends DefuddleMetadata {
|
|
|
25
25
|
export interface DefuddleOptions {
|
|
26
26
|
/**
|
|
27
27
|
* Enable debug logging
|
|
28
|
+
* Defaults to false
|
|
28
29
|
*/
|
|
29
30
|
debug?: boolean;
|
|
30
31
|
/**
|
|
@@ -33,25 +34,27 @@ export interface DefuddleOptions {
|
|
|
33
34
|
url?: string;
|
|
34
35
|
/**
|
|
35
36
|
* Convert output to Markdown
|
|
37
|
+
* Defaults to false
|
|
36
38
|
*/
|
|
37
39
|
markdown?: boolean;
|
|
38
40
|
/**
|
|
39
41
|
* Include Markdown in the response
|
|
42
|
+
* Defaults to false
|
|
40
43
|
*/
|
|
41
44
|
separateMarkdown?: boolean;
|
|
42
45
|
/**
|
|
43
|
-
*
|
|
44
|
-
* Defaults to true
|
|
46
|
+
* Remove elements matching exact selectors like ads, social buttons, etc
|
|
47
|
+
* Defaults to true
|
|
45
48
|
*/
|
|
46
49
|
removeExactSelectors?: boolean;
|
|
47
50
|
/**
|
|
48
|
-
*
|
|
49
|
-
* Defaults to true
|
|
51
|
+
* Remove elements matching partial selectors like ads, social buttons, etc
|
|
52
|
+
* Defaults to true
|
|
50
53
|
*/
|
|
51
54
|
removePartialSelectors?: boolean;
|
|
52
55
|
/**
|
|
53
|
-
*
|
|
54
|
-
* Defaults to false
|
|
56
|
+
* Remove images
|
|
57
|
+
* Defaults to false
|
|
55
58
|
*/
|
|
56
59
|
removeImages?: boolean;
|
|
57
60
|
}
|