Skip to content
JS
Package

strip-comments

Strip line and/or block comments from a string. Blazing fast, and works with JavaScript, Sass, CSS, Less.js, and a number of other languages.

v2.0.1, 13 Nov 2019MITCommonJSTypes: NoneCSS-in-JS and styling
$ npm install strip-comments

Key numbers

As of 25 Sept 2026
Weekly downloads
8.8m
+47% over 12 months
Gzip bundle size
-
No Bundlephobia data
Dependencies
0
Direct, from package.json
Last release
6 years ago
v2.0.1
GitHub stars
-
Open issues / PRs
- / -
Contributors
-
Commits, last 52 weeks
-

Downloads

Last week 2026-09-15 to 2026-09-21
02.5m5m7.5m10mSept 2025Mar 2026Sept 2026High 9.3m (4 Aug 2026)Low 3.3m (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.

8,750,949 downloads last week, 33,870,102 in the last month. The 12-month change of +47% compares the average of the last 4 weeks with the first 4 weeks of the series.

Releases, last 12 months
021 in total
Latest version
2.0.1, 13 Nov 20196 years ago
First published
10 Feb 2014
Last push to GitHub
-
Repository archived
-
Open issues
-
Open pull requests
-
Commits, last 52 weeks
-
Dependents on npm
453

Major versions

  1. v2 first release 2.0.0, 6 Nov 2019
  2. v1 first release 1.0.0, 24 Mar 2018
  3. v0 first release 0.1.0, 10 Feb 2014

Recent releases

VersionPublished
2.0.113 Nov 2019
2.0.06 Nov 2019
1.0.23 May 2018
1.0.124 Mar 2018
1.0.024 Mar 2018
0.4.414 Feb 2016
0.4.325 Dec 2015
0.4.211 Dec 2015
0.4.14 Nov 2015
0.4.04 Nov 2015
0.3.422 Oct 2015
0.3.22 Sept 2014
0.3.12 Sept 2014
0.3.02 Sept 2014
Module format
CommonJSFrom package.json type, main and exports fields
TypeScript types
None
Node.js engine range
>=10
Runtimes
-
Unpacked size (npm)
26 kB
Dependencies (0)
None
npm install strip-comments
  • jsDelivrhttps://cdn.jsdelivr.net/npm/strip-comments@2.0.1/
  • unpkghttps://unpkg.com/strip-comments@2.0.1/
  • esm.shhttps://esm.sh/strip-comments@2.0.1
Sources: npm registry, npm downloads API. Data fetched 25 Sept 2026.

Indexability: Not indexed (discovery only): GitHub data not fetched yet.