(value: string)
| 203 | } |
| 204 | |
| 205 | export const maskSecretValue = (value: string): string => { |
| 206 | if (!value) { |
| 207 | return '***' |
| 208 | } |
| 209 | |
| 210 | if (value.length <= 4) { |
| 211 | return '*'.repeat(value.length) |
| 212 | } |
| 213 | |
| 214 | return `${value.slice(0, 2)}***${value.slice(-2)}` |
| 215 | } |
no outgoing calls
no test coverage detected