Skip to content

Commit d34dcf0

Browse files
committed
docs: update readme
1 parent 66fc277 commit d34dcf0

File tree

1 file changed

+3
-15
lines changed

1 file changed

+3
-15
lines changed

README.md

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,8 @@ It downloads packages from the npm registry and analyzes them to extract their p
3434
import { extractPackageApi } from "@jsdocs-io/extractor";
3535

3636
(async () => {
37-
const result = await extractPackageApi({ pkg: "preact" });
38-
if (result.isOk()) {
39-
const packageApi = result.value; // Successfully extracted API
40-
console.log(JSON.stringify(packageApi, null, 2));
41-
} else {
42-
const extractorError = result.error; // Error extracting API
43-
console.error(extractorError);
44-
}
37+
const packageApi = await extractPackageApi({ pkg: "preact" });
38+
console.log(JSON.stringify(packageApi, null, 2));
4539
})();
4640
```
4741

@@ -52,13 +46,7 @@ import { extractPackageApi } from "@jsdocs-io/extractor";
5246

5347
(async () => {
5448
const result = await extractPackageApi({ pkg: "preact", subpath: "hooks" });
55-
if (result.isOk()) {
56-
const packageApi = result.value; // Successfully extracted API
57-
console.log(JSON.stringify(packageApi, null, 2));
58-
} else {
59-
const extractorError = result.error; // Error extracting API
60-
console.error(extractorError);
61-
}
49+
console.log(JSON.stringify(packageApi, null, 2));
6250
})();
6351
```
6452

0 commit comments

Comments
 (0)