Skip to content

Commit

Permalink
docs: update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
velut committed Mar 5, 2024
1 parent 66fc277 commit d34dcf0
Showing 1 changed file with 3 additions and 15 deletions.
18 changes: 3 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,8 @@ It downloads packages from the npm registry and analyzes them to extract their p
import { extractPackageApi } from "@jsdocs-io/extractor";

(async () => {
const result = await extractPackageApi({ pkg: "preact" });
if (result.isOk()) {
const packageApi = result.value; // Successfully extracted API
console.log(JSON.stringify(packageApi, null, 2));
} else {
const extractorError = result.error; // Error extracting API
console.error(extractorError);
}
const packageApi = await extractPackageApi({ pkg: "preact" });
console.log(JSON.stringify(packageApi, null, 2));
})();
```

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

(async () => {
const result = await extractPackageApi({ pkg: "preact", subpath: "hooks" });
if (result.isOk()) {
const packageApi = result.value; // Successfully extracted API
console.log(JSON.stringify(packageApi, null, 2));
} else {
const extractorError = result.error; // Error extracting API
console.error(extractorError);
}
console.log(JSON.stringify(packageApi, null, 2));
})();
```

Expand Down

0 comments on commit d34dcf0

Please sign in to comment.