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
lodash.camelcase
The lodash method `_.camelCase` exported as a module.
pascalcase
Convert a string to pascal case (upper camelcase).
@types/camelcase-css
TypeScript definitions for camelcase-css
change-case
Transform a string between `camelCase`, `PascalCase`, `Capital Case`, `snake_case`, `kebab-case`, `CONSTANT_CASE` and others
Convert a dash/dot/underscore/space separated string to camelCase: foo-bar → fooBar
npm install camelcase
99.5
Supply Chain
99.5
Quality
76
Maintenance
100
Vulnerability
100
License
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
683 Stars
100 Commits
94 Forks
14 Watching
1 Branches
28 Contributors
Updated on 21 Nov 2024
Minified
Minified + Gzipped
JavaScript (96.5%)
TypeScript (3.5%)
Cumulative downloads
Total Downloads
Last day
-8.4%
16,827,277
Compared to previous day
Last week
0.7%
98,973,713
Compared to previous week
Last month
14%
407,136,942
Compared to previous month
Last year
3.1%
4,203,415,333
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'); 16//=> 'fooBar' 17 18console.log(process.argv[3]); 19//=> '--foo-bar' 20camelCase(process.argv[3]); 21//=> 'fooBar' 22 23camelCase(['foo', 'bar']); 24//=> 'fooBar' 25 26camelCase(['__foo__', '--bar']); 27//=> 'fooBar'
Type: string | string[]
The string to convert to camel case.
Type: object
Type: boolean
Default: false
Uppercase the first character: foo-bar
→ FooBar
1import camelCase from 'camelcase';
2
3camelCase('foo-bar', {pascalCase: true});
4//=> 'FooBar'
5
6camelCase('foo-bar', {pascalCase: false});
7//=> 'fooBar'
Type: boolean
Default: false
Preserve consecutive uppercase characters: foo-BAR
→ FooBAR
1import camelCase from 'camelcase'; 2 3camelCase('foo-BAR', {preserveConsecutiveUppercase: true}); 4//=> 'fooBAR' 5 6camelCase('foo-BAR', {preserveConsecutiveUppercase: false}); 7//=> '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 2024-11-18
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