Created
December 4, 2021 07:13
-
-
Save PatrickKalkman/97e88a908c8d61610c4c892fbc6d2cd6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Pipe({ | |
name: 'duration', | |
pure: true | |
}) | |
export class DurationPipe implements PipeTransform { | |
transform(value: any): any { | |
const { min, sec } = parseDuration(value); | |
return `${min}m${padTime(sec)}s`; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment