mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-22 15:56:16 -04:00
linting
This commit is contained in:
parent
c8e306d4f4
commit
3acbe2f744
2 changed files with 3 additions and 3 deletions
|
@ -4,7 +4,7 @@
|
|||
* @license Apache-2.0
|
||||
*/
|
||||
|
||||
import YAML from 'yaml'
|
||||
import YAML from "yaml";
|
||||
import Operation from "../Operation.mjs";
|
||||
import OperationError from "../errors/OperationError.mjs";
|
||||
|
||||
|
@ -37,7 +37,7 @@ class JSONToYAML extends Operation {
|
|||
const doc = new YAML.Document();
|
||||
try {
|
||||
doc.contents = JSON.parse(input.replace(/(\w+):/gm, `"$1":`));
|
||||
return doc.toString()
|
||||
return doc.toString();
|
||||
} catch (err) {
|
||||
throw new OperationError("Unable to parse JSON to YAML: " + err.toString());
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* @license Apache-2.0
|
||||
*/
|
||||
|
||||
import YAML from 'yaml'
|
||||
import YAML from "yaml";
|
||||
import Operation from "../Operation.mjs";
|
||||
import OperationError from "../errors/OperationError.mjs";
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue