Mask chars beyond 16 (#1666)

fixes #1662
This commit is contained in:
Matt Hill
2022-07-18 18:31:53 -06:00
committed by GitHub
parent 5268185604
commit 56acb3f281

View File

@@ -4,9 +4,7 @@ import { Pipe, PipeTransform } from '@angular/core'
name: 'mask',
})
export class MaskPipe implements PipeTransform {
transform(val: string, max = 16): string {
if (!val) return val
const times = val.length <= max ? val.length : max
return '●'.repeat(times)
transform(val: string): string {
return val && '●'.repeat(val.length)
}
}