Created
September 16, 2021 12:57
-
-
Save nilsandrey/ee2c5237a0ed8fabb2b1704c2f2ad91c to your computer and use it in GitHub Desktop.
to-gb.pipe.ts
This file contains 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
import { Pipe, PipeTransform } from '@angular/core'; | |
@Pipe({ | |
name: 'toGb' | |
}) | |
export class ToGbPipe implements PipeTransform { | |
transform(value: number, args?: any): string { | |
return (value / 1073741824).toFixed(2).toString(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment