File tree Expand file tree Collapse file tree 2 files changed +15
-3
lines changed Expand file tree Collapse file tree 2 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -29,10 +29,10 @@ The implementation aims to be the same and it keeps the same test set to ensure
29
29
30
30
## Installation
31
31
32
- ` cheer-reader ` is available on npm :
32
+ ` cheer-reader ` is available on jsr :
33
33
34
34
``` bash
35
- npm install cheer-reader
35
+ npx jsr add @paoramen/ cheer-reader
36
36
```
37
37
38
38
## Basic usage
Original file line number Diff line number Diff line change @@ -98,7 +98,7 @@ type Options = {
98
98
baseURI ?: string
99
99
}
100
100
101
- export type Metadata = {
101
+ type Metadata = {
102
102
title ?: string | null
103
103
byline ?: string | null
104
104
excerpt ?: string | null
@@ -107,6 +107,12 @@ export type Metadata = {
107
107
datePublished ?: string | null
108
108
}
109
109
110
+ /**
111
+ * The object that `parse` returns.
112
+ *
113
+ * It contains some metadata, and if the `extraction` option is set to `true` (default),
114
+ * it also contains the extracted content.
115
+ */
110
116
export type ReadabilityResult = {
111
117
title : string | null
112
118
byline : string | null
@@ -138,6 +144,12 @@ type Candidate = Element & {
138
144
contentScore : number
139
145
}
140
146
147
+ /**
148
+ * Readability is the main class of the library.
149
+ *
150
+ * It exposes a single method, `parse`, which takes an HTML string and returns
151
+ * an object containing the extracted content.
152
+ */
141
153
export class Readability {
142
154
private $ : CheerioAPI
143
155
private options : Options
You can’t perform that action at this time.
0 commit comments