import {Pipe, PipeTransform} from '@angular/core';

@Pipe({
  name: 'times'
})
export class TimesPipe implements PipeTransform {

  transform(array: any , number: number): any {
    if (array.length === 0 ) {
      return null;
    }
    return array.slice(0, number);
  }


}
