1
0
Code Issues Pull Requests Packages Projects Releases Wiki Activity GitHub Gitee

实现 连字符(脊柱式命名) Kebab Case / Spinal Case,驼峰脊柱式命名 Camel Kebab Case,连字符命名大写 Kebab Upper Case;完善测试用例;通过测试用例

This commit is contained in:
2024-04-03 23:54:38 +08:00
parent e7b62379c9
commit 723d9148b9
8 changed files with 261 additions and 17 deletions

View File

@@ -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 },
];