Skip to content

Repository files navigation

@jsdocs-io/extractor

Build statusCoveragejsDocs.ioLanguagenpmLicense

This is the API extractor powering jsDocs.io.

It downloads packages from the npm registry and analyzes them to extract their public API.

Requirements

  • Bun must be installed and available in the PATH to resolve and install packages

API & Package Info

Usage Examples

Warning

Analyzing packages is a blocking operation that requires some time, even seconds, to finish! Using workers is recommended.

  1. Analyze the latest version of the preact package from the npm registry:
import{getPackageApi}from"@jsdocs-io/extractor";(async()=>{constpackageApi=awaitgetPackageApi({pkg: "preact"});console.log(JSON.stringify(packageApi,null,2));})();
  1. Analyze a specific subpath export, like preact/hooks:
import{getPackageApi}from"@jsdocs-io/extractor";(async()=>{constresult=awaitgetPackageApi({pkg: "preact",subpath: "hooks"});console.log(JSON.stringify(packageApi,null,2));})();

License

AGPL-3.0-or-later

Copyright (C) 2025 Edoardo Scibona. See LICENSE.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see https://www.gnu.org/licenses/.

About

The API extractor for npm packages powering jsDocs.io

Topics

Resources

Stars

16 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages