mirror of
https://github.com/SECTL/SecScore.git
synced 2026-07-21 18:19:03 +08:00
style: 移除多个文件末尾的空行并格式化代码
refactor(ci): 统一字符串引号风格为单引号 refactor(color): 简化数组返回语法 docs: 调整文档中的代码注释格式 chore: 添加.gitattributes文件配置行尾符
This commit is contained in:
@@ -1,11 +1,7 @@
|
||||
function hexToRgb(hex: string): [number, number, number] {
|
||||
const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex)
|
||||
return result
|
||||
? [
|
||||
parseInt(result[1], 16),
|
||||
parseInt(result[2], 16),
|
||||
parseInt(result[3], 16)
|
||||
]
|
||||
? [parseInt(result[1], 16), parseInt(result[2], 16), parseInt(result[3], 16)]
|
||||
: [0, 0, 0]
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user