Gathering detailed insights and metrics for camelcase-keys
Gathering detailed insights and metrics for camelcase-keys
Gathering detailed insights and metrics for camelcase-keys
Gathering detailed insights and metrics for camelcase-keys
decamelize-keys
Convert object keys from camel case
camelcase-keys-recursive
Adaptation of camelcase-keys but recursive.
@types/camelcase-keys
Stub TypeScript definitions entry for camelcase-keys, which provides its own types definitions
camelcase-keys-deep
Deeply convert the keys of an object to camelCase
npm install camelcase-keys
Typescript
Module System
Min. Node Version
Node Version
NPM Version
99.3
Supply Chain
99.5
Quality
76
Maintenance
100
Vulnerability
99.6
License
TypeScript (63.32%)
JavaScript (36.68%)
Total Downloads
4,884,309,583
Last Day
955,089
Last Week
16,451,893
Last Month
72,782,368
Last Year
780,260,302
MIT License
715 Stars
95 Commits
97 Forks
8 Watchers
1 Branches
23 Contributors
Updated on Jun 14, 2025
Minified
Minified + Gzipped
Latest Version
9.1.3
Package Id
camelcase-keys@9.1.3
Unpacked Size
12.57 kB
Size
4.15 kB
File Count
5
NPM Version
9.2.0
Node Version
21.5.0
Published on
Jan 13, 2024
Cumulative downloads
Total Downloads
Last Day
-15.7%
955,089
Compared to previous day
Last Week
-10.2%
16,451,893
Compared to previous week
Last Month
5.8%
72,782,368
Compared to previous month
Last Year
-7.3%
780,260,302
Compared to previous year
Convert object keys to camel case using
camelcase
1npm install camelcase-keys
1import camelcaseKeys from 'camelcase-keys'; 2 3// Convert an object 4camelcaseKeys({'foo-bar': true}); 5//=> {fooBar: true} 6 7// Convert an array of objects 8camelcaseKeys([{'foo-bar': true}, {'bar-foo': false}]); 9//=> [{fooBar: true}, {barFoo: false}]
1import {parseArgs} from 'node:util'; 2import camelcaseKeys from 'camelcase-keys'; 3 4const commandLineArguments = parseArgs(); 5//=> {_: [], 'foo-bar': true} 6 7camelcaseKeys(commandLineArguments); 8//=> {_: [], fooBar: true}
Type: Record<string, unknown> | ReadonlyArray<Record<string, unknown>>
A plain object or array of plain objects to camel-case.
Type: object
Type: Array<string | RegExp>
Default: []
Exclude keys from being camel-cased.
Type: boolean
Default: false
Recurse nested objects and objects in arrays.
1import camelcaseKeys from 'camelcase-keys'; 2 3const object = { 4 'foo-bar': true, 5 nested: { 6 unicorn_rainbow: true 7 } 8}; 9 10camelcaseKeys(object, {deep: true}); 11//=> {fooBar: true, nested: {unicornRainbow: true}} 12 13camelcaseKeys(object, {deep: false}); 14//=> {fooBar: true, nested: {unicorn_rainbow: true}}
Type: boolean
Default: false
Uppercase the first character: bye-bye
→ ByeBye
1import camelcaseKeys from 'camelcase-keys'; 2 3camelcaseKeys({'foo-bar': true}, {pascalCase: true}); 4//=> {FooBar: true} 5 6camelcaseKeys({'foo-bar': true}, {pascalCase: false}); 7//=> {fooBar: true}
Type: boolean
Default: false
Preserve consecutive uppercase characters: foo-BAR
→ FooBAR
1import camelcaseKeys from 'camelcase-keys'; 2 3camelcaseKeys({'foo-BAR': true}, {preserveConsecutiveUppercase: true}); 4//=> {fooBAR: true} 5 6camelcaseKeys({'foo-BAR': true}, {preserveConsecutiveUppercase: false}); 7//=> {fooBar: true}
Type: string[]
Default: []
Exclude children at the given object paths in dot-notation from being camel-cased.
For example, with an object like {a: {b: '🦄'}}
, the object path to reach the unicorn is 'a.b'
.
1import camelcaseKeys from 'camelcase-keys'; 2 3const object = { 4 a_b: 1, 5 a_c: { 6 c_d: 1, 7 c_e: { 8 e_f: 1 9 } 10 } 11}; 12 13camelcaseKeys(object, { 14 deep: true, 15 stopPaths: [ 16 'a_c.c_e' 17 ] 18}), 19/* 20{ 21 aB: 1, 22 aC: { 23 cD: 1, 24 cE: { 25 e_f: 1 26 } 27 } 28} 29*/
No vulnerabilities found.
Reason
security policy file detected
Details
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
0 existing vulnerabilities detected
Reason
Found 12/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
detected GitHub workflow tokens with excessive permissions
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
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