
Product
Socket for Jira Is Now Available
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.
recursively transform key strings from camel-case to underscore-style. Derives directly from substack's camelize
var snakeize = require('snakeize');
var obj = {
feeFieFoe: 'fum',
beepBoop: [
{ 'abcXyz': 'mno' },
{ 'FooBar': 'baz' },
{ 'CheeseID': 'wensleydale' }
]
};
var res = snakeize(obj);
console.log(JSON.stringify(res, null, 2));
output:
{
"fee_fie_foe": "fum",
"beep_boop": [
{
"abc_xyz": "mno"
},
{
"foo_bar": "baz"
},
{
"cheese_id": "wensleydale"
}
]
}
var snakeize = require('snakeize')
Convert the key strings in obj from camel-case to underscore-stlye recursively.
With npm do:
npm install snakeize
To use in the browser, use browserify or component:
component install nathan7/snakeize
MIT
The camelcase-keys package converts object keys to camelCase. It is similar to snakeize but focuses on converting keys to camelCase instead of snake_case.
The decamelize-keys package converts object keys from camelCase to another format, such as snake_case. It is similar to snakeize but offers more flexibility in the target format.
Lodash is a utility library that provides a wide range of functions for manipulating objects, arrays, and other data structures. It includes a method for converting object keys to snake_case, but it is a more general-purpose library compared to snakeize.
FAQs
recursively transform key strings from camel-case to underscore-style
The npm package snakeize receives a total of 314,848 weekly downloads. As such, snakeize popularity was classified as popular.
We found that snakeize demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.