实现 连字符(脊柱式命名) Kebab Case / Spinal Case,驼峰脊柱式命名 Camel Kebab Case,连字符命名大写 Kebab Upper Case;完善测试用例;通过测试用例
This commit is contained in:
@@ -30,9 +30,9 @@ export function activate(context: vscode.ExtensionContext) {
|
||||
|
||||
/**
|
||||
* 编辑器右键菜单
|
||||
*
|
||||
* @param convertFunction
|
||||
* @returns
|
||||
*
|
||||
* @param convertFunction
|
||||
* @returns
|
||||
*/
|
||||
const handleEditorReplace = (convertFunction: ConvertFunction) => {
|
||||
// 获取当前编辑器
|
||||
@@ -76,6 +76,9 @@ export function activate(context: vscode.ExtensionContext) {
|
||||
const commands: Array<{ command: string; convertFunction: ConvertFunction }> = [
|
||||
{ command: 'extension.toCamelCase', convertFunction: TextConversion.toCamelCase },
|
||||
{ command: 'extension.toPascalCase', convertFunction: TextConversion.toPascalCase },
|
||||
{ command: 'extension.toKebabCase', convertFunction: TextConversion.toKebabCase },
|
||||
{ command: 'extension.toCamelKebabCase', convertFunction: TextConversion.toCamelKebabCase },
|
||||
{ command: 'extension.toKebabUpperCase', convertFunction: TextConversion.toKebabUpperCase },
|
||||
{ command: 'extension.toUpperCase', convertFunction: TextConversion.toUpperCase },
|
||||
{ command: 'extension.toLowerCase', convertFunction: TextConversion.toLowerCase },
|
||||
];
|
||||
|
Reference in New Issue
Block a user