Gathering detailed insights and metrics for @puuuudding/decamelize-keys
Gathering detailed insights and metrics for @puuuudding/decamelize-keys
Gathering detailed insights and metrics for @puuuudding/decamelize-keys
Gathering detailed insights and metrics for @puuuudding/decamelize-keys
npm install @puuuudding/decamelize-keys
Typescript
Module System
Min. Node Version
Node Version
NPM Version
JavaScript (75.73%)
TypeScript (24.27%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
65 Commits
2 Branches
1 Contributors
Updated on Jun 13, 2025
Latest Version
6.2.2
Package Id
@puuuudding/decamelize-keys@6.2.2
Unpacked Size
8.70 kB
Size
3.18 kB
File Count
5
NPM Version
6.14.9
Node Version
12.20.0
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
This project was forked from camelcase-keys
and converted to do the opposite. This project will keep updated with camelcase-keys
.
Convert object keys to lowercased one using
decamelize
.
$ npm install @puuuudding/decamelize-keys
1const decamelizeKeys = require('decamelize-keys'); 2 3// Convert an object 4decamelizeKeys({fooBar: true}); 5//=> {'foo_bar': true} 6 7// Convert an array of objects 8decamelizeKeys([{fooBar: true}, {barFoo: false}]); 9//=> [{'foo_bar': true}, {'bar_foo': false}] 10 11decamelizeKeys({fooBar: true, nested: {unicornRainbow: true}}, {deep: true}); 12//=> {'foo_bar': true, nested: {'unicorn_rainbow': true}} 13 14// Use custom separator 15decamelizeKeys({fooBar: true, nested: {unicornRainbow: true}}, {deep: true, separator: '-'}); 16//=> {'foo-bar': true, nested: {'unicorn-rainbow': true}}
Type: object | object[]
An object or array of objects to decamelize.
Type: object
Type: Array<string | RegExp>
Default: []
Exclude keys from being camel-cased.
Type: string[]
Default: []
Exclude children at the given object paths in dot-notation from being decamelize. For example, with an object like {a: {b: '🦄'}}
, the object path to reach the unicorn is 'a.b'
.
1decamelizeKeys({ 2 aB: 1, 3 aC: { 4 cD: 1, 5 cE: { 6 eF: 1 7 } 8 } 9}, { 10 deep: true, 11 stopPaths: [ 12 'aC.cE' 13 ] 14}) 15/* 16{ 17 a_b: 1, 18 a_c: { 19 c_d: 1, 20 c_e: { 21 eF: 1 22 } 23 } 24} 25*/
Type: boolean
Default: false
Recurse nested objects and objects in arrays.
Type: string
Default: '_'
Character or string inserted to separate words in key.
1const decamelize = require('decamelize'); 2 3decamelize('unicornRainbow'); 4//=> 'unicorn_rainbow' 5 6decamelize('unicornRainbow', {separator: '-'}); 7//=> 'unicorn-rainbow'
Type: boolean
Default: false
Preserve sequences of uppercase characters.
1const decamelize = require('decamelize'); 2 3decamelize('testGUILabel'); 4//=> 'test_gui_label' 5 6decamelize('testGUILabel', {preserveConsecutiveUppercase: true}); 7//=> 'test_GUI_label'
See camelcase-keys
for the inverse.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no SAST tool detected
Details
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
security policy file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
53 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
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