mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-20 14:56:19 -04:00
ESM: Tidied up Set operations
This commit is contained in:
parent
955a082614
commit
e99331f305
12 changed files with 81 additions and 487 deletions
|
@ -4,7 +4,6 @@
|
|||
* @license Apache-2.0
|
||||
*/
|
||||
|
||||
import Utils from "../Utils";
|
||||
import Operation from "../Operation";
|
||||
|
||||
/**
|
||||
|
@ -20,7 +19,7 @@ class PowerSet extends Operation {
|
|||
|
||||
this.name = "Power Set";
|
||||
this.module = "Default";
|
||||
this.description = "Generate the power set of a set";
|
||||
this.description = "Calculates all the subsets of a set.";
|
||||
this.inputType = "string";
|
||||
this.outputType = "string";
|
||||
this.args = [
|
||||
|
@ -34,8 +33,10 @@ class PowerSet extends Operation {
|
|||
|
||||
/**
|
||||
* Generate the power set
|
||||
* @param input
|
||||
* @param args
|
||||
*
|
||||
* @param {string} input
|
||||
* @param {Object[]} args
|
||||
* @returns {string}
|
||||
*/
|
||||
run(input, args) {
|
||||
[this.itemDelimiter] = args;
|
||||
|
@ -43,7 +44,7 @@ class PowerSet extends Operation {
|
|||
const inputArray = input.split(this.itemDelimiter).filter(a => a);
|
||||
|
||||
if (inputArray.length) {
|
||||
return Utils.escapeHtml(this.runPowerSet(inputArray));
|
||||
return this.runPowerSet(inputArray);
|
||||
}
|
||||
|
||||
return "";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue