camelcase
npmv9.0.0TypeScriptConvert a dash/dot/underscore/space separated string to camelCase or PascalCase: `foo-bar` → `fooBar`
Safe to adopt
Yes — camelcase scores well across adoption, maintenance, weight, supply chain, and licensing. 95.7M downloads per week and 2 known dependents. Last published 303 days ago.
- AAdoption: grade A, Excellent.
95.7M downloads per week and 2 known dependents.
- BMaintenance: grade B, Good.
Last published 303 days ago.
- AWeight: grade A, Excellent.
Zero runtime dependencies, about 17 KB installed.
- BSupply chain: grade B, Good.
This package has a single maintainer (bus factor of 1).
- ALicense: grade A, Excellent.
MIT — permissive, with no copyleft found in the dependency tree.
Grades are computed deterministically from registry metadata collected by PackageGraph — downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.
Install cost
What you actually take on by adding camelcase to a project.
Runtime packages this one declares itself.
Distinct packages in the full runtime tree, deduplicated the way a package manager would.
Unpacked size of this package plus its entire runtime tree.
Longest resolved dependency chain below this package.
Compatibility
- Node.js
- node >=20
- Module format
- ESM only
- TypeScript
- Types included
- Install scripts
- None
Quick start
A usage example from the camelcase README.
import camelCase from 'camelcase';
camelCase('foo-bar');
//=> 'fooBar'
camelCase('foo_bar');
//=> 'fooBar'
camelCase('Foo-Bar');
//=> 'fooBar'
camelCase('розовый_пушистый_единорог');
//=> 'розовыйПушистыйЕдинорог'
camelcase vs the alternatives
Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.
| Package | Weekly downloads | Dependents | License | Last release |
|---|---|---|---|---|
| camelcasethis page | 95.7M | 2 | MIT | 10 months ago |
| decamelize | 62.6M | 4 | MIT | 1 day ago |
| split-on-first | 9.7M | 1 | MIT | 1 day ago |
| indent-string | 94M | 2 | MIT | 1 day ago |
| get-east-asian-width | 69.3M | 1 | MIT | 1 day ago |
| index-to-position | 0 | 1 | MIT | 1 day ago |
Dependencies
Declared by camelcase v9.0.0. Runtime dependencies are installed with the package; dev dependencies are not.
Dev (3)
Used by
Popular packages that depend on camelcase.
Generic configuration validation tool that helps you with warnings, errors and deprecation messages as well as showing users examples of correct configuration.
Utility function to load nyc configuration
Relationship graph
Dependencies (left) and dependents (right) of camelcase.
Frequently installed together
Measure the difference between two strings using the Levenshtein distance algorithm
This package contains shared types of Jest's packages.
TypeScript definitions for yargs
Stringify any JavaScript value.
A utility function to get the type of a value
Find a file or directory by walking up parent directories
Determine the `package.json#type` which applies to a location
Resolve the path of a module like `require.resolve()` but from a given path
The semantic version parser used by npm.
Release history
1 release in the last two years, typically about 155 days apart.
| Version | Published | Size | License |
|---|---|---|---|
| 9.0.0latest | 10 months ago | 17 KB | MIT |
| 8.0.0 | 3 years ago | 11 KB | MIT |
| 7.0.1 | 3 years ago | 11 KB | MIT |
| 7.0.0 | 4 years ago | 11 KB | MIT |
| 6.3.0 | 4 years ago | 11 KB | MIT |
| 6.2.1 | 4 years ago | 11 KB | MIT |
| 6.2.0 | 5 years ago | 10 KB | MIT |
| 6.1.0 | 6 years ago | 9.0 KB | MIT |
| 6.0.0 | 6 years ago | 7.2 KB | MIT |
| 5.3.1 | 7 years ago | 7.3 KB | MIT |
| 5.3.0 | 7 years ago | 7.3 KB | MIT |
| 5.2.0 | 7 years ago | 6.3 KB | MIT |
| 5.1.0 | 7 years ago | 5.8 KB | MIT |
| 5.0.0 | 8 years ago | 5.0 KB | MIT |
| 4.1.0 | 9 years ago | — | MIT |
Overview
camelcase is an npm package that convert a dash/dot/underscore/space separated string to camelCase or PascalCase: `foo-bar` → `fooBar`. It is extremely widely used, with about 95.7M downloads per week and 2 known dependents in the graph. The latest version is 9.0.0, released under the MIT license.
Who should use it
Teams working in the npm ecosystem who need convert a dash/dot/underscore/space separated string to camelCase or PascalCase: `foo-bar` → `fooBar` and value a battle-tested, widely-adopted solution.
When not to use it
Consider an alternative if you need to or if a more actively-maintained option better fits your npm stack.
Pros
- Large, well-established user base (95.7M weekly downloads).
- Ships TypeScript type definitions.
- Clear open-source license (MIT).
- Lean dependency tree (3 direct dependencies).
Cons
- No significant drawbacks detected from available metadata.
Auto-generated from collected registry metadata. No external claims are inferred.
Maintainers
Funding
Frequently asked questions
Should I use camelcase?
Yes — camelcase scores well across adoption, maintenance, weight, supply chain, and licensing. 95.7M downloads per week and 2 known dependents. Last published 303 days ago.
How do I install camelcase?
Run `npm install camelcase` to add camelcase to your npm project.
What license is camelcase released under?
camelcase is distributed under the MIT license.
How popular is camelcase?
camelcase has approximately 95,655,369 downloads per week and 2 known dependent packages.
Is camelcase still maintained?
The most recent release of camelcase (v9.0.0) was published 10 months ago.
Does camelcase run install scripts?
No. camelcase does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.