src/pipes/csa/csa.ts
Name | csa |
transform | ||||||
transform(value: string | string[])
|
||||||
Defined in src/pipes/csa/csa.ts:8
|
||||||
Parameters :
Returns :
any
|
import { Pipe, PipeTransform } from '@angular/core';
@Pipe({
name: 'csa',
})
export class CSAPipe implements PipeTransform {
transform(value: string | string[]) {
if (typeof value === 'string') {
return value;
} else if (value instanceof Array) {
return value.join(', ');
} else {
return value;
}
}
}