mirror of
https://github.com/gchq/CyberChef
synced 2025-12-05 23:53:27 +00:00
renamed function for clarity
This commit is contained in:
@@ -73,7 +73,7 @@
|
|||||||
"CBOR Encode",
|
"CBOR Encode",
|
||||||
"CBOR Decode",
|
"CBOR Decode",
|
||||||
"YAML to JSON",
|
"YAML to JSON",
|
||||||
"Beautify YAML",
|
"JSON to YAML",
|
||||||
"Caret/M-decode",
|
"Caret/M-decode",
|
||||||
"Rison Encode",
|
"Rison Encode",
|
||||||
"Rison Decode",
|
"Rison Decode",
|
||||||
|
|||||||
@@ -9,17 +9,17 @@ import OperationError from "../errors/OperationError.mjs";
|
|||||||
import YAML from "yaml";
|
import YAML from "yaml";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Beautify YAML operation
|
* JSON to YAML operation
|
||||||
*/
|
*/
|
||||||
class BeautifyYAML extends Operation {
|
class JSONtoYAML extends Operation {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* BeautifyYAML constructor
|
* JSONtoYAML constructor
|
||||||
*/
|
*/
|
||||||
constructor() {
|
constructor() {
|
||||||
super();
|
super();
|
||||||
|
|
||||||
this.name = "Beautify YAML";
|
this.name = "JSON to YAML";
|
||||||
this.module = "Default";
|
this.module = "Default";
|
||||||
this.description = "Format a JSON object into YAML";
|
this.description = "Format a JSON object into YAML";
|
||||||
this.infoURL = "https://en.wikipedia.org/wiki/YAML";
|
this.infoURL = "https://en.wikipedia.org/wiki/YAML";
|
||||||
@@ -43,4 +43,4 @@ class BeautifyYAML extends Operation {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default BeautifyYAML;
|
export default JSONtoYAML;
|
||||||
@@ -166,12 +166,10 @@ import "./tests/CBORDecode.mjs";
|
|||||||
import "./tests/JA3Fingerprint.mjs";
|
import "./tests/JA3Fingerprint.mjs";
|
||||||
import "./tests/JA3SFingerprint.mjs";
|
import "./tests/JA3SFingerprint.mjs";
|
||||||
import "./tests/HASSH.mjs";
|
import "./tests/HASSH.mjs";
|
||||||
import "./tests/BeautifyYAML.mjs";
|
import "./tests/JSONtoYAML.mjs";
|
||||||
|
|
||||||
|
|
||||||
// Cannot test operations that use the File type yet
|
// Cannot test operations that use the File type yet
|
||||||
// import "./tests/SplitColourChannels.mjs";
|
// import "./tests/SplitColourChannels.mjs";
|
||||||
import "./tests/BeautifyYAML.mjs";
|
|
||||||
import "./tests/YARA.mjs";
|
import "./tests/YARA.mjs";
|
||||||
import "./tests/ParseCSR.mjs";
|
import "./tests/ParseCSR.mjs";
|
||||||
import "./tests/XXTEA.mjs";
|
import "./tests/XXTEA.mjs";
|
||||||
|
|||||||
@@ -28,12 +28,12 @@ TestRegister.addTests([
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "Beautify YAML",
|
name: "JSON to YAML",
|
||||||
input: EXAMPLE_JSON,
|
input: EXAMPLE_JSON,
|
||||||
expectedOutput: `number: 3\nplain: string\n`,
|
expectedOutput: `number: 3\nplain: string\n`,
|
||||||
recipeConfig: [
|
recipeConfig: [
|
||||||
{
|
{
|
||||||
op: "Beautify YAML",
|
op: "JSON to YAML",
|
||||||
args: [],
|
args: [],
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
Reference in New Issue
Block a user