docs(AI Code Review): 補齊 action 與 workflow 註解說明
This commit is contained in:
@@ -111,6 +111,12 @@ function cleanText(value) {
|
||||
* 以模組層級 Map 對「字串輸入」做 memoization,避免重複跑 NFKC/正則替換。
|
||||
*/
|
||||
const _normalizeTextCache = new Map();
|
||||
/**
|
||||
* 將文字正規化成比對用形式。
|
||||
*
|
||||
* @param {*} value - 任意值。
|
||||
* @remarks 適合用於誤報過濾與排除條目比對。
|
||||
*/
|
||||
export function normalizeText(value) {
|
||||
if (typeof value === 'string' && _normalizeTextCache.has(value)) return _normalizeTextCache.get(value);
|
||||
const result = cleanText(value)
|
||||
|
||||
Reference in New Issue
Block a user