轉換為驼峰命名

按照相應標准将輸入轉換為驼峰命名。

輸入: 文本結果: 文本

文本輸入

工具選項

範例

Map a JSON API field to a JavaScript property

A snake_case API field becomes lower camel case.

輸入

first_name

Expected answer

firstName
尝试感知上下文
Off
Keep a mixed acronym boundary readable

XML becomes xml; the following capitalized words remain boundaries.

輸入

XMLHttpRequest

Expected answer

xmlHttpRequest
尝试感知上下文
Off
Remove the accent when naming a café menu property

Lodash removes the accent as part of word normalization.

輸入

café menu price

Expected answer

cafeMenuPrice
尝试感知上下文
Off
Rename bare keys while retaining a double-quoted value

Context mode preserves this double-quoted string; it is a token heuristic, not a language-aware refactor.

輸入

user_name = "display_name"; retry_count = 3;

Expected answer

userName = "display_name"; retryCount = 3;
尝试感知上下文
On
Turn a versioned heading into a property name

The numeric suffix is retained.

輸入

HTTP response code 404

Expected answer

httpResponseCode404
尝试感知上下文
Off
To Camel case (dumb)

輸入

hello world

Expected answer

helloWorld
尝试感知上下文
Off
To Camel case (smart)

輸入

test='hello'
echo $test
a_camel_case_function
$a_camel_case_variable;
function function_name() {
  console.log('things inside quotes do not get broken');
  console.log("things inside quotes do not get broken");
}

Expected answer

test='hello'
echo $test
aCamelCaseFunction
$aCamelCaseVariable;
function functionName() {
  console.log('things inside quotes do not get broken');
  console.log("things inside quotes do not get broken");
}
尝试感知上下文
On

参數

参數默認值輸入與選項
尝试感知上下文false開啟或关閉

相关工具

程式碼整理

操作参考

查看原始技术文檔 (English)