committed by
trae-solo-agent
co-authored by
Kimi-K3.1-Pro
parent
d731fc1da3
commit
a45a3d7a86
@@ -0,0 +1,16 @@
|
||||
function maskIdNumber(value) {
|
||||
const text = String(value || '').trim()
|
||||
if (!text) return ''
|
||||
if (text.length <= 8) return '********'
|
||||
return `${text.slice(0, 4)}********${text.slice(-4)}`
|
||||
}
|
||||
|
||||
function maskOrderId(value) {
|
||||
const text = String(value || '').trim()
|
||||
return text ? `****${text.slice(-8).toUpperCase()}` : '--'
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
maskIdNumber,
|
||||
maskOrderId
|
||||
}
|
||||
Reference in New Issue
Block a user