Skip to content
Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
10 lines (8 sloc) 258 Bytes
import { Pipe, PipeTransform } from '@angular/core';
import { isArray, sum } from '../utils/utils';
@Pipe({ name: 'sum' })
export class SumPipe implements PipeTransform {
transform(input: any): any {
return !isArray(input) ? input : sum(input);
}
}
You can’t perform that action at this time.