File tree Expand file tree Collapse file tree 1 file changed +3
-15
lines changed Expand file tree Collapse file tree 1 file changed +3
-15
lines changed Original file line number Diff line number Diff line change @@ -34,14 +34,8 @@ It downloads packages from the npm registry and analyzes them to extract their p
3434import { 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
You can’t perform that action at this time.
0 commit comments