SHARE
TWEET

Untitled

a guest May 25th, 2019 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import { Pipe, PipeTransform } from '@angular/core';
  2.  
  3. @Pipe({
  4.     name: 'LeftPaddingFilter',
  5.     pure: false
  6. })
  7. export class LeftPaddingFilter implements PipeTransform {
  8.     transform(item: string): string {
  9.         return (String('0').repeat(4) + item).substr((4 * -1), 4);
  10.     }
  11. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top