First usable version based on AngularJS 2! Almost no converters yet, though.
This commit is contained in:
parent
8acddfe548
commit
4197bca299
13 changed files with 155 additions and 66 deletions
15
app/converter/base64decoder.ts
Normal file
15
app/converter/base64decoder.ts
Normal file
|
@ -0,0 +1,15 @@
|
|||
import {Converter} from "./converter";
|
||||
|
||||
export class Base64Decoder implements Converter {
|
||||
getDisplayname():string {
|
||||
return "Decode Base 64";
|
||||
}
|
||||
|
||||
getId():string {
|
||||
return "base64decode";
|
||||
}
|
||||
|
||||
convert(input:string):string {
|
||||
return atob(input);
|
||||
}
|
||||
}
|
15
app/converter/base64encoder.ts
Normal file
15
app/converter/base64encoder.ts
Normal file
|
@ -0,0 +1,15 @@
|
|||
import {Converter} from "./converter";
|
||||
|
||||
export class Base64Encoder implements Converter {
|
||||
getDisplayname():string {
|
||||
return "Encode Base 64";
|
||||
}
|
||||
|
||||
getId():string {
|
||||
return "base64encode";
|
||||
}
|
||||
|
||||
convert(input:string):string {
|
||||
return btoa(input);
|
||||
}
|
||||
}
|
5
app/converter/converter.ts
Normal file
5
app/converter/converter.ts
Normal file
|
@ -0,0 +1,5 @@
|
|||
export interface Converter {
|
||||
getDisplayname():string;
|
||||
getId():string;
|
||||
convert(input:string):string;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue