mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2026-02-27 09:31:40 +08:00
加强变量校验,重复和非法时自动重命名,优化变量管理,实时获取最新变量,不再进行增删操作
This commit is contained in:
@@ -117,6 +117,9 @@ const reservedWords = [
|
||||
* @returns {object} - 包含验证结果和错误信息的对象
|
||||
*/
|
||||
export function validateVariableName(name) {
|
||||
// 去除空格
|
||||
name = name.trim();
|
||||
|
||||
// 检查是否为空
|
||||
if (!name) {
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user