Skip to content
JS
Package

has-ansi

Check if a string has ANSI escape codes

v6.0.2, 8 Sept 2025MITESM onlyTypes: BundledCLI tools and terminal utilities
$ npm install has-ansi

Key numbers

As of 25 Sept 2026
Weekly downloads
12.6m
-2% over 12 months
Gzip bundle size
-
No Bundlephobia data
Dependencies
1
Direct, from package.json
Last release
1 year ago
v6.0.2
GitHub stars
50
7 forks
Open issues / PRs
0 / 0
Contributors
-
Commits, last 52 weeks
1

Downloads

Last week 2026-09-15 to 2026-09-21
05m10m15m20mSept 2025Mar 2026Sept 2026High 17.6m (21 Oct 2025)Low 6.6m (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.

12,618,622 downloads last week, 55,364,499 in the last month. The 12-month change of -2% compares the average of the last 4 weeks with the first 4 weeks of the series.

Releases, last 12 months
013 in total
Latest version
6.0.2, 8 Sept 20251 year ago
First published
14 Jun 2014
Last push to GitHub
18 Sept 20266 days before the snapshot
Repository archived
No
Open issues
0
Open pull requests
0
Commits, last 52 weeks
1
Dependents on npm
423

Major versions

  1. v6 first release 6.0.0, 10 Jul 2024
  2. v5 first release 5.0.0, 16 Apr 2021
  3. v4 first release 4.0.0, 10 Sept 2019
  4. v3 first release 3.0.0, 20 Jun 2017
  5. v2 first release 2.0.0, 30 Jun 2015
  6. v1 first release 1.0.0, 13 Aug 2014
  7. v0 first release 0.1.0, 14 Jun 2014

Recent releases

VersionPublished
6.0.28 Sept 2025
6.0.010 Jul 2024
5.0.113 Sept 2021
5.0.016 Apr 2021
4.0.126 Feb 2021
4.0.010 Sept 2019
3.0.020 Jun 2017
2.0.030 Jun 2015
1.0.322 Feb 2015
1.0.216 Feb 2015
1.0.128 Dec 2014
1.0.013 Aug 2014
0.1.014 Jun 2014
Module format
ESM onlyFrom package.json type, main and exports fields
TypeScript types
Bundled
Node.js engine range
>=18
Runtimes
-
Unpacked size (npm)
3.1 kB
Dependencies (1)
ansi-regex
npm install has-ansi
  • jsDelivrhttps://cdn.jsdelivr.net/npm/has-ansi@6.0.2/
  • unpkghttps://unpkg.com/has-ansi@6.0.2/
  • esm.shhttps://esm.sh/has-ansi@6.0.2
PackageWeekly downloadsGzipLast releaseModuleComparison
yoctocolors28.1m-1 month agoESM only-
yoctocolors-cjs21.5m-1 year agoCommonJS-
Sources: npm registry, npm downloads API, GitHub API. Data fetched 25 Sept 2026.

Indexability: Indexed.