feat: change to center and clean code

This commit is contained in:
2025-02-16 02:09:14 +08:00
parent 73de223d56
commit 1363b87f36
97 changed files with 882 additions and 6775 deletions

View File

@@ -1,16 +0,0 @@
/**
* 提取 {{}} 中的 key
* @param text
* @returns
*/
export function extractKeysFromBraces(text: string) {
const regex = /\{\{\s*(.*?)\s*\}\}/g;
const keys: string[] = [];
let matches: RegExpExecArray | null;
while ((matches = regex.exec(text)) !== null) {
keys.push(matches[1]); // 获取{{}}中间的key
}
return keys;
}