Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Generated on Apr 25, 2024 via pnpm

camelcase 6.3.0

Convert a dash/dot/underscore/space separated string to camelCase or PascalCase: `foo-bar` β†’ `fooBar`
Package summary
Share
0
issues
1
license
1
MIT
Package created
30 Oct 2013
Version published
1 Jan 2022
Maintainers
1
Total deps
1
Direct deps
0
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
1 Packages, Including:
camelcase@6.3.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

0
All Dependencies CSV
β“˜ This is a list of camelcase 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does camelcase do?

Camelcase is a popular npm package that efficiently converts a dash, dot, underscore, or space separated string into camelCase or PascalCase. This tool is particularly valuable because it correctly handles Unicode strings. Therefore, users inputting untrusted data must remember to limit the length to a reasonable standard to prevent any issues.

How do you use camelcase?

Using the camelcase npm package is fairly straightforward. First you need to install the package using npm by typing the command npm install camelcase in the command line. Once that's done, you can import the package into your script with import camelCase from 'camelcase'. This package can then be used in various ways to transform your text.

Below are a few examples:

import camelCase from 'camelcase';

camelCase('foo-bar');
// Output: 'fooBar'

camelCase('foo bar');
// Output: 'fooBar'

camelCase('foo_bar');
// Output: 'fooBar'

camelCase('Foo-Bar', {pascalCase: true});
// Output: 'FooBar'

You can also use options such as pascalCase to capitalize the first character, preserveConsecutiveUppercase to preserve consecutive uppercase characters or locale to specify the locale to be used for the conversion.

Where are the camelcase docs?

The camelcase documentation is located directly in the package's README on GitHub. Simply visit the GitHub repository at https://github.com/sindresorhus/camelcase to access comprehensive details about the package's functionality, installation, and usage. Along with a detailed API description, the docs feature code examples and descriptions of all the options and related packages.