Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on Mar 31, 2024 via pnpm

decamelize 2.0.0

Convert a camelized string into a lowercased one with a custom separator: unicornRainbow β†’ unicorn_rainbow
Package summary
Share
0
issues
1
license
2
MIT
Package created
24 Jan 2015
Version published
8 Jan 2018
Maintainers
1
Total deps
2
Direct deps
1
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
2 Packages, Including:
decamelize@2.0.0
xregexp@4.0.0
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

1
All Dependencies CSV
β“˜ This is a list of decamelize 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
xregexp4.0.0182.03 kBMIT
prod

Visualizations

Frequently Asked Questions

What does decamelize do?

Decamelize is a JavaScript package that provides a convenient way to convert camelized strings into lowercased ones with a custom separator. It's a helpful tool for developers that allows them to transform, for example, a string like 'unicornRainbow' into 'unicorn_rainbow' or 'unicorn-rainbow', depending on the separator chosen. Decamelize is particularly important when dealing with string manipulations in coding practices.

How do you use decamelize?

Using decamelize is pretty straightforward. After installing it via npm using the command npm install decamelize, you can import it into your file using import decamelize from 'decamelize'.

Once it's imported, decamelizing a string becomes a one-line task:

decamelize('unicornRainbow');
// Output: 'unicorn_rainbow'

You can also customise the separator that's inserted between words:

decamelize('unicornRainbow', {separator: '-'});
// Output: 'unicorn-rainbow'

Furthermore, it's possible to choose whether or not to convert consecutive uppercase letters in keeping with the rest of the string:

decamelize('testGUILabel', {preserveConsecutiveUppercase: true});
// Output: 'test_GUI_label'

Where are the decamelize docs?

The detailed documentation for decamelize, including its installation, usage, and API, can be found on its GitHub page. Taking the time to browse through the documented examples and conditions can greatly improve your coding and problem-solving skills.