converter/src/app/converter/punycodedecoder.ts

21 lines
489 B
TypeScript
Raw Normal View History

2016-09-27 23:50:52 +02:00
import {Converter} from "./converter";
import {NativeLibraryWrapperService} from "../nativelibrarywrapper.service";
export class PunycodeDecoder implements Converter {
constructor(private nativeLibraryWrapperService: NativeLibraryWrapperService) {
}
2016-09-27 23:50:52 +02:00
getDisplayname(): string {
return "Decode from punycode";
}
2016-09-27 23:50:52 +02:00
getId(): string {
return "decodepunycode";
}
2016-09-27 23:50:52 +02:00
convert(input: string): string {
return this.nativeLibraryWrapperService.punycode.decode(input);
}
2016-09-27 23:50:52 +02:00
}