(str: string, mask = '*')
| 265 | } |
| 266 | |
| 267 | function maskString(str: string, mask = '*') { |
| 268 | const allMasked = str.replace(/(\w)/g, mask); |
| 269 | if (str.length < 8) { |
| 270 | return allMasked; |
| 271 | } |
| 272 | |
| 273 | return `${str.slice(0, 4)}${allMasked.slice(4)}`; |
| 274 | } |
| 275 | |
| 276 | export function transformMinimalEvent( |
| 277 | event: IServiceEvent |
no test coverage detected