Skip to content
JS
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).

v1.1.0, 24 Nov 2018MITCommonJSTypes: NoneFiles and file systemsNode.js utilities
$ npm install extract-comments

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
050k100k150kSept 2025Mar 2026Sept 2026High 112.2k (28 Jul 2026)Low 32.9k (23 Dec 2025)
Weekly npm downloads, one point per week, weeks starting 23 Sept 2025 to 15 Sept 2026. The y axis starts at zero.

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
  • jsDelivrhttps://cdn.jsdelivr.net/npm/extract-comments@1.1.0/
  • unpkghttps://unpkg.com/extract-comments@1.1.0/
  • esm.shhttps://esm.sh/extract-comments@1.1.0
PackageWeekly downloadsGzipLast releaseModuleComparison
babel-extract-comments1.4m-8 years ago--
ignore237.8m-2 days ago--
parse-glob2.4m-11 years agoCommonJS-
multiparty733.1k-14 days ago--
path-complete-extname322.1k-8 years agoCommonJS-
watchr20.5k-5 years agoCommonJS-
Sources: npm registry, npm downloads API, GitHub API. Data fetched 25 Sept 2026.

Indexability: Indexed.