mirror of
https://github.com/gchq/CyberChef.git
synced 2024-11-16 08:58:30 +01:00
65 lines
1.3 KiB
JavaScript
65 lines
1.3 KiB
JavaScript
/**
|
|
* @author n1474335 [n1474335@gmail.com]
|
|
* @copyright Crown Copyright 2016
|
|
* @license Apache-2.0
|
|
*/
|
|
|
|
import Operation from "../Operation.mjs";
|
|
|
|
/**
|
|
* To Lower case operation
|
|
*/
|
|
class ToLowerCase extends Operation {
|
|
|
|
/**
|
|
* ToLowerCase constructor
|
|
*/
|
|
constructor() {
|
|
super();
|
|
|
|
this.name = "To Lower case";
|
|
this.module = "Default";
|
|
this.description = "Converts every character in the input to lower case.";
|
|
this.inputType = "string";
|
|
this.outputType = "string";
|
|
this.args = [];
|
|
}
|
|
|
|
/**
|
|
* @param {string} input
|
|
* @param {Object[]} args
|
|
* @returns {string}
|
|
*/
|
|
run(input, args) {
|
|
return input.toLowerCase();
|
|
}
|
|
|
|
/**
|
|
* Highlight To Lower case
|
|
*
|
|
* @param {Object[]} pos
|
|
* @param {number} pos[].start
|
|
* @param {number} pos[].end
|
|
* @param {Object[]} args
|
|
* @returns {Object[]} pos
|
|
*/
|
|
highlight(pos, args) {
|
|
return pos;
|
|
}
|
|
|
|
/**
|
|
* Highlight To Lower case in reverse
|
|
*
|
|
* @param {Object[]} pos
|
|
* @param {number} pos[].start
|
|
* @param {number} pos[].end
|
|
* @param {Object[]} args
|
|
* @returns {Object[]} pos
|
|
*/
|
|
highlightReverse(pos, args) {
|
|
return pos;
|
|
}
|
|
|
|
}
|
|
|
|
export default ToLowerCase;
|