mirror of
https://github.com/gchq/CyberChef
synced 2024-11-15 09:07:06 +00:00
update operation
This commit is contained in:
parent
f1ffe19ec8
commit
54793f2b78
1 changed files with 1 additions and 14 deletions
|
@ -5,7 +5,6 @@
|
|||
*/
|
||||
|
||||
import Operation from "../Operation";
|
||||
import OperationError from "../errors/OperationError";
|
||||
|
||||
/**
|
||||
* Remove Letter Accents operation
|
||||
|
@ -25,18 +24,6 @@ class RemoveLetterAccents extends Operation {
|
|||
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
|
||||
}
|
||||
*/
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -46,8 +33,8 @@ class RemoveLetterAccents extends Operation {
|
|||
* @returns {string}
|
||||
*/
|
||||
run(input, args) {
|
||||
return input.normalize("NFD").replace(/[\u0300-\u036f]/g, "");
|
||||
//reference: https://stackoverflow.com/questions/990904/remove-accents-diacritics-in-a-string-in-javascript/37511463
|
||||
return input.normalize("NFD").replace(/[\u0300-\u036f]/g, "");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue