mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-20 14:56:19 -04:00
Moved ops to different modules
This commit is contained in:
parent
1b870e559e
commit
ed930d2364
7 changed files with 15 additions and 26 deletions
|
@ -20,7 +20,7 @@ class RisonEncode extends Operation {
|
|||
super();
|
||||
|
||||
this.name = "Rison Encode";
|
||||
this.module = "Default";
|
||||
this.module = "Encodings";
|
||||
this.description = "Rison, a data serialization format optimized for compactness in URIs. Rison is a slight variation of JSON that looks vastly superior after URI encoding. Rison still expresses exactly the same set of data structures as JSON, so data can be translated back and forth without loss or guesswork.";
|
||||
this.infoURL = "https://github.com/Nanonid/rison";
|
||||
this.inputType = "Object";
|
||||
|
@ -28,13 +28,8 @@ class RisonEncode extends Operation {
|
|||
this.args = [
|
||||
{
|
||||
name: "Encode Option",
|
||||
type: "editableOption",
|
||||
value: [
|
||||
{ name: "Encode", value: "Encode", },
|
||||
{ name: "Encode Object", value: "Encode Object", },
|
||||
{ name: "Encode Array", value: "Encode Array", },
|
||||
{ name: "Encode URI", value: "Encode URI", }
|
||||
]
|
||||
type: "option",
|
||||
value: ["Encode", "Encode Object", "Encode Array", "Encode URI"]
|
||||
},
|
||||
];
|
||||
}
|
||||
|
@ -55,8 +50,9 @@ class RisonEncode extends Operation {
|
|||
return rison.encode_array(input);
|
||||
case "Encode URI":
|
||||
return rison.encode_uri(input);
|
||||
default:
|
||||
throw new OperationError("Invalid encode option");
|
||||
}
|
||||
throw new OperationError("Invalid encode option");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue