renovate/lib/util/mask.ts
2019-08-15 08:26:21 +02:00

9 lines
198 B
TypeScript

export function maskToken(str?: string): string {
return str
? [
str.substring(0, 2),
new Array(str.length - 3).join('*'),
str.slice(-2),
].join('')
: str;
}