Skip to content
JS
Package

to-valid-identifier

Convert a string to a valid JavaScript identifier

v1.0.0, 15 Oct 2025MITESM onlyTypes: BundledSecurity
$ npm install to-valid-identifier

Key numbers

As of 25 Sept 2026
Weekly downloads
2.4m
+11880% over 12 months
Gzip bundle size
-
No Bundlephobia data
Dependencies
2
Direct, from package.json
Last release
11 months ago
v1.0.0
GitHub stars
42
3 forks
Open issues / PRs
0 / 0
Contributors
-
Commits, last 52 weeks
6

Downloads

Last week 2026-09-15 to 2026-09-21
01m2m3m4mSept 2025Mar 2026Sept 2026High 3.2m (18 Aug 2026)Low 116 (30 Sept 2025)
Weekly npm downloads, one point per week, weeks starting 23 Sept 2025 to 15 Sept 2026. The y axis starts at zero.

2,388,661 downloads last week, 10,426,233 in the last month. The 12-month change of +11880% compares the average of the last 4 weeks with the first 4 weeks of the series.

Releases, last 12 months
13 in total
Latest version
1.0.0, 15 Oct 202511 months ago
First published
5 May 2024
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
6
Dependents on npm
4

Major versions

  1. v1 first release 1.0.0, 15 Oct 2025
  2. v0 first release 0.1.0, 5 May 2024

Recent releases

VersionPublished
1.0.015 Oct 2025
0.1.128 May 2024
0.1.05 May 2024
Module format
ESM onlyFrom package.json type, main and exports fields
TypeScript types
Bundled
Node.js engine range
>=20
Runtimes
-
Unpacked size (npm)
4.5 kB
Dependencies (2)
@sindresorhus/base62reserved-identifiers
npm install to-valid-identifier
  • jsDelivrhttps://cdn.jsdelivr.net/npm/to-valid-identifier@1.0.0/
  • unpkghttps://unpkg.com/to-valid-identifier@1.0.0/
  • esm.shhttps://esm.sh/to-valid-identifier@1.0.0
Sources: npm registry, npm downloads API, GitHub API. Data fetched 25 Sept 2026.

Indexability: Indexed.