converter/src/app/converter/punycodedecoder.ts

21 lines
491 B
TypeScript

import {Converter} from './converter';
import {NativeLibraryWrapperService} from '../native-library-wrapper.service';
export class PunycodeDecoder implements Converter {
constructor(private nativeLibraryWrapperService: NativeLibraryWrapperService) {
}
getDisplayname(): string {
return 'Decode from punycode';
}
getId(): string {
return 'decodepunycode';
}
convert(input: string): string {
return this.nativeLibraryWrapperService.punycode.decode(input);
}
}