Socket
Socket
Sign inDemoInstall

decamelize-keys-deep

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

decamelize-keys-deep

Convert a camelized string into a lowercased one with a custom separator: unicornRainbow → unicorn_rainbow


Version published
Weekly downloads
4.3K
increased by18.38%
Maintainers
1
Weekly downloads
 
Created
Source

decamelize-keys-deep

Convert a camelized object into a lowercased one with a custom separator
Example: {unicornRainbow: {fooBar: 1}}{unicorn_rainbow: {foo_bar: 1}}

Install

$ npm install --save decamelize-keys-deep

Usage

const decamelizeKeysDeep = require('decamelize-keys-deep');

decamelizeKeysDeep({unicornRainbow: {fooBar: 1}});
//=> {unicorn_rainbow: {foo_bar: 1}}

decamelizeKeysDeep({unicornRainbow: {fooBar: 1}}, '-');
//=> {unicorn-rainbow: {foo-bar: 1}}

API

decamelizeKeysDeep(input, [separator])

input

Type: object

separator

Type: string
Default: _

See camelcase-keys-deep for the inverse.

License

MIT © Rafael Xavier de Souza

Keywords

FAQs

Package last updated on 14 Apr 2016

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc