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

@Pipe({
    name: 'rechargePlatform'
})
export class RechargePlatformPipe implements PipeTransform {

    transform(value: string): unknown {
        const array = value.split('-');
        let string = '';
        for (const i of array) {
            if (Number(i) === 1) {
                string = string +  '尖椒,';
            }
            if (Number(i) === 2) {
                string = string +  '龙阅,';
            }
            if (Number(i) === 3) {
                string = string +  '城宇,';
            }

        }
        return string.substring(0 , string.length - 1);
    }

}
