mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-04-04 22:39:46 +00:00
@@ -4,9 +4,7 @@ import { Pipe, PipeTransform } from '@angular/core'
|
|||||||
name: 'mask',
|
name: 'mask',
|
||||||
})
|
})
|
||||||
export class MaskPipe implements PipeTransform {
|
export class MaskPipe implements PipeTransform {
|
||||||
transform(val: string, max = 16): string {
|
transform(val: string): string {
|
||||||
if (!val) return val
|
return val && '●'.repeat(val.length)
|
||||||
const times = val.length <= max ? val.length : max
|
|
||||||
return '●'.repeat(times)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user