Gathering detailed insights and metrics for camelcase
Gathering detailed insights and metrics for camelcase
Gathering detailed insights and metrics for camelcase
Gathering detailed insights and metrics for camelcase
camelcase-keys
Convert object keys to camel case
camelcase-css
Convert a kebab-cased CSS property into a camelCased DOM property.
lodash.camelcase
The lodash method `_.camelCase` exported as a module.
camel-case
Transform into a string with the separator denoted by the next word capitalized
Convert a dash/dot/underscore/space separated string to camelCase: foo-bar → fooBar
npm install camelcase
Typescript
Module System
Min. Node Version
Node Version
NPM Version
99.8
Supply Chain
99.5
Quality
76
Maintenance
100
Vulnerability
100
License
JavaScript (96.5%)
TypeScript (3.5%)
Total Downloads
21,623,773,058
Last Day
6,086,308
Last Week
100,141,653
Last Month
431,312,761
Last Year
4,405,032,879
MIT License
694 Stars
100 Commits
98 Forks
13 Watchers
1 Branches
28 Contributors
Updated on Jun 11, 2025
Minified
Minified + Gzipped
Latest Version
8.0.0
Package Id
camelcase@8.0.0
Unpacked Size
10.90 kB
Size
3.43 kB
File Count
5
NPM Version
9.2.0
Node Version
16.20.0
Published on
Aug 09, 2023
Cumulative downloads
Total Downloads
Last Day
-7.6%
6,086,308
Compared to previous day
Last Week
-7.4%
100,141,653
Compared to previous week
Last Month
5.3%
431,312,761
Compared to previous month
Last Year
7.3%
4,405,032,879
Compared to previous year
Convert a dash/dot/underscore/space separated string to camelCase or PascalCase:
foo-bar
→fooBar
Correctly handles Unicode strings.
If you use this on untrusted user input, don't forget to limit the length to something reasonable.
1npm install camelcase
1import camelCase from 'camelcase'; 2 3camelCase('foo-bar'); 4//=> 'fooBar' 5 6camelCase('foo_bar'); 7//=> 'fooBar' 8 9camelCase('Foo-Bar'); 10//=> 'fooBar' 11 12camelCase('розовый_пушистый_единорог'); 13//=> 'розовыйПушистыйЕдинорог' 14 15camelCase('Foo-Bar', {pascalCase: true}); 16//=> 'FooBar' 17 18camelCase('--foo.bar', {pascalCase: false}); 19//=> 'fooBar' 20 21camelCase('Foo-BAR', {preserveConsecutiveUppercase: true}); 22//=> 'fooBAR' 23 24camelCase('fooBAR', {pascalCase: true, preserveConsecutiveUppercase: true}); 25//=> 'FooBAR' 26 27camelCase('foo bar'); 28//=> 'fooBar' 29 30console.log(process.argv[3]); 31//=> '--foo-bar' 32camelCase(process.argv[3]); 33//=> 'fooBar' 34 35camelCase(['foo', 'bar']); 36//=> 'fooBar' 37 38camelCase(['__foo__', '--bar'], {pascalCase: true}); 39//=> 'FooBar' 40 41camelCase(['foo', 'BAR'], {pascalCase: true, preserveConsecutiveUppercase: true}) 42//=> 'FooBAR' 43 44camelCase('lorem-ipsum', {locale: 'en-US'}); 45//=> 'loremIpsum'
Type: string | string[]
The string to convert to camel case.
Type: object
Type: boolean
Default: false
Uppercase the first character: foo-bar
→ FooBar
Type: boolean
Default: false
Preserve consecutive uppercase characters: foo-BAR
→ FooBAR
.
Type: false | string | string[]
Default: The host environment’s current locale.
The locale parameter indicates the locale to be used to convert to upper/lower case according to any locale-specific case mappings. If multiple locales are given in an array, the best available locale is used.
1import camelCase from 'camelcase'; 2 3camelCase('lorem-ipsum', {locale: 'en-US'}); 4//=> 'loremIpsum' 5 6camelCase('lorem-ipsum', {locale: 'tr-TR'}); 7//=> 'loremİpsum' 8 9camelCase('lorem-ipsum', {locale: ['en-US', 'en-GB']}); 10//=> 'loremIpsum' 11 12camelCase('lorem-ipsum', {locale: ['tr', 'TR', 'tr-TR']}); 13//=> 'loremİpsum'
Setting locale: false
ignores the platform locale and uses the Unicode Default Case Conversion algorithm:
1import camelCase from 'camelcase'; 2 3// On a platform with 'tr-TR' 4 5camelCase('lorem-ipsum'); 6//=> 'loremİpsum' 7 8camelCase('lorem-ipsum', {locale: false}); 9//=> 'loremIpsum'
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
security policy file detected
Details
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 14/30 approved changesets -- score normalized to 4
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-06-16
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More