You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

camel-case

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

camel-case

Transform into a string with the separator denoted by the next word capitalized


Version published
Weekly downloads
17M
decreased by-0.64%
Maintainers
1
Install size
11.8 kB
Created
Weekly downloads
 

Package description

What is camel-case?

The camel-case npm package is a utility for converting strings into camelCase text. It is often used in programming environments where camelCase is the standard naming convention for identifiers, such as in JavaScript. This package can be particularly useful for formatting strings received from different sources (like user input or external APIs) to match the camelCase naming convention used in a codebase.

What are camel-case's main functionalities?

Convert string to camelCase

This feature allows you to convert any string, including phrases with spaces or special characters, into camelCase. It's useful for standardizing text input for variable names, object keys, or any other identifiers in code.

const { camelCase } = require('camel-case');

const result = camelCase('hello world');
console.log(result); // 'helloWorld'

Other packages similar to camel-case

Readme

Source

Camel Case

Transform into a string with the separator denoted by the next word capitalized.

Installation

npm install camel-case --save

Usage

import { camelCase } from "camel-case";

camelCase("string"); //=> "string"
camelCase("dot.case"); //=> "dotCase"
camelCase("PascalCase"); //=> "pascalCase"
camelCase("version 1.2.10"); //=> "version_1_2_10"

The function also accepts options.

Merge Numbers

If you'd like to remove the behavior prefixing _ before numbers, you can use camelCaseTransformMerge:

import { camelCaseTransformMerge } from "camel-case";

camelCase("version 12", { transform: camelCaseTransformMerge }); //=> "version12"

License

MIT

Keywords

FAQs

Package last updated on 30 Sep 2023

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc