15 lines
322 B
TypeScript
15 lines
322 B
TypeScript
|
import {Converter} from "./converter";
|
||
|
export class DecToHexConverter implements Converter {
|
||
|
getDisplayname():string {
|
||
|
return "Convert decimal to heximal";
|
||
|
}
|
||
|
|
||
|
getId():string {
|
||
|
return "dectohex";
|
||
|
}
|
||
|
|
||
|
convert(input:string):string {
|
||
|
return parseInt(input, 10).toString(16);
|
||
|
}
|
||
|
}
|