Convert camelCase strings to lowercase with custom separators like unicornRainbow → unicorn_rainbow.
Decamelize is a JavaScript library that converts camelCase strings to lowercase strings with customizable separators. It solves the common problem of transforming JavaScript-style property names into formats suitable for URLs, filenames, database fields, or other systems that use different naming conventions.
JavaScript and Node.js developers who need to normalize or transform string identifiers between different naming conventions in their applications.
Developers choose Decamelize for its simplicity, reliability, and flexibility—it provides a focused solution with clear options for separator customization and uppercase handling without unnecessary complexity.
Convert a camelized string into a lowercased one with a custom separator: unicornRainbow → unicorn_rainbow
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Allows specifying any separator character, such as hyphens for URLs or dots for filenames, as demonstrated in the README with the {separator: '-'} option.
The preserveConsecutiveUppercase option maintains sequences like 'GUI' intact, useful for technical terms, shown in the README example converting 'testGUILabel' to 'test_GUI_label'.
Offers a straightforward function with intuitive options, making it easy to integrate without complexity, as highlighted in the simple usage examples.
The inverse camelcase package is available for reverse transformations, ensuring consistency when working with both camelCase and separated formats, as mentioned in the 'Related' section.
Only supports camelCase input; converting from other formats like PascalCase or handling mixed conventions requires additional logic or separate packages.
The README warns about untrusted input without providing validation, leaving security handling like length limiting entirely to the user.
For complete case transformation workflows, such as converting back to camelCase, installing the separate camelcase package is necessary, adding to project dependencies.