diff --git a/elements/URLConverter.js b/elements/URLConverter.js new file mode 100644 index 0000000..9e8bdb9 --- /dev/null +++ b/elements/URLConverter.js @@ -0,0 +1,10 @@ +class URLConverter extends Converter { + constructor() { + super("URL Converter", [ + { label : "Encode", conversionFunction : (d) => encodeURIComponent(d) }, + { label : "Decode", conversionFunction : (d) => decodeURIComponent(d) }, + ]); + + this.outputs[0].type = "string"; + } +} \ No newline at end of file diff --git a/index.html b/index.html index dd95c9f..978fa9e 100644 --- a/index.html +++ b/index.html @@ -12,6 +12,7 @@ +