Package
extract-comments
Uses esprima to extract line and block comments from a string of JavaScript. Also optionally parses code context (the next line of code after a comment).
Key numbers
As of 25 Sept 2026
- Weekly downloads
- 80.3k
- +11% over 12 months
- Gzip bundle size
- -
- No Bundlephobia data
- Dependencies
- 2
- Direct, from package.json
- Last release
- 7 years ago
- v1.1.0
- GitHub stars
- 50
- 9 forks
- Open issues / PRs
- 2 / 1
- Contributors
- -
- Commits, last 52 weeks
- 0
Downloads
Last week 2026-09-15 to 2026-09-21
80,322 downloads last week, 335,041 in the last month. The 12-month change of +11% compares the average of the last 4 weeks with the first 4 weeks of the series.
- Releases, last 12 months
- -
- Latest version
- 1.1.0, 24 Nov 20187 years ago
- First published
- -
- Last push to GitHub
- 24 Nov 20182,861 days before the snapshot
- Repository archived
- No
- Open issues
- 2
- Open pull requests
- 1
- Commits, last 52 weeks
- 0
- Dependents on npm
- 63
Major versions
-
Recent releases
-
- Module format
- CommonJSFrom package.json type, main and exports fields
- TypeScript types
- None
- Node.js engine range
- >=6
- Runtimes
- -
- Unpacked size (npm)
- 19 kB
- Dependencies (2)
parse-code-contextesprima-extract-comments
npm install extract-comments- jsDelivr
https://cdn.jsdelivr.net/npm/extract-comments@1.1.0/ - unpkg
https://unpkg.com/extract-comments@1.1.0/ - esm.sh
https://esm.sh/extract-comments@1.1.0
| Package | Weekly downloads | Gzip | Last release | Module | Comparison |
|---|---|---|---|---|---|
| babel-extract-comments | 1.4m | - | 8 years ago | - | - |
| ignore | 237.8m | - | 2 days ago | - | - |
| parse-glob | 2.4m | - | 11 years ago | CommonJS | - |
| multiparty | 733.1k | - | 14 days ago | - | - |
| path-complete-extname | 322.1k | - | 8 years ago | CommonJS | - |
| watchr | 20.5k | - | 5 years ago | CommonJS | - |
Indexability: Indexed.