mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-20 14:56:19 -04:00
create operation from npm run newop
This commit is contained in:
parent
ec9dfd2918
commit
ac2466a304
2 changed files with 57 additions and 0 deletions
|
@ -166,6 +166,7 @@
|
||||||
"ops": [
|
"ops": [
|
||||||
"Encode text",
|
"Encode text",
|
||||||
"Decode text",
|
"Decode text",
|
||||||
|
"Remove Letter Accents",
|
||||||
"Unescape Unicode Characters"
|
"Unescape Unicode Characters"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
56
src/core/operations/RemoveLetterAccents.mjs
Normal file
56
src/core/operations/RemoveLetterAccents.mjs
Normal file
|
@ -0,0 +1,56 @@
|
||||||
|
/**
|
||||||
|
* @author Klaxon [klaxon@veyr.com]
|
||||||
|
* @copyright Crown Copyright 2018
|
||||||
|
* @license Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
import Operation from "../Operation";
|
||||||
|
import OperationError from "../errors/OperationError";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove Letter Accents operation
|
||||||
|
*/
|
||||||
|
class RemoveLetterAccents extends Operation {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* RemoveLetterAccents constructor
|
||||||
|
*/
|
||||||
|
constructor() {
|
||||||
|
super();
|
||||||
|
|
||||||
|
this.name = "Remove Letter Accents";
|
||||||
|
this.module = "Default";
|
||||||
|
this.description = "Replaces accented characters with their latin character equivalent.";
|
||||||
|
this.infoURL = "";
|
||||||
|
this.inputType = "string";
|
||||||
|
this.outputType = "string";
|
||||||
|
this.args = [
|
||||||
|
/* Example arguments. See the project wiki for full details.
|
||||||
|
{
|
||||||
|
name: "First arg",
|
||||||
|
type: "string",
|
||||||
|
value: "Don't Panic"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Second arg",
|
||||||
|
type: "number",
|
||||||
|
value: 42
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {string} input
|
||||||
|
* @param {Object[]} args
|
||||||
|
* @returns {string}
|
||||||
|
*/
|
||||||
|
run(input, args) {
|
||||||
|
// const [firstArg, secondArg] = args;
|
||||||
|
|
||||||
|
throw new OperationError("Test");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
export default RemoveLetterAccents;
|
Loading…
Add table
Add a link
Reference in a new issue