mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-21 07:16:17 -04:00
Merge branch 'master' of github.com:gchq/CyberChef into expose-operationerror
This commit is contained in:
commit
bd6673afed
12 changed files with 1069 additions and 60 deletions
|
@ -43,11 +43,13 @@ class NodeRecipe {
|
|||
} else {
|
||||
throw new TypeError("Inputted function not a Chef operation.");
|
||||
}
|
||||
// CASE: op with configuration
|
||||
} else if (ing.op && ing.args) {
|
||||
// Return op and args pair for opList item.
|
||||
// CASE: op, maybe with configuration
|
||||
} else if (ing.op) {
|
||||
const sanitisedOp = this._validateIngredient(ing.op);
|
||||
return {op: sanitisedOp, args: ing.args};
|
||||
if (ing.args) {
|
||||
return {op: sanitisedOp, args: ing.args};
|
||||
}
|
||||
return sanitisedOp;
|
||||
} else {
|
||||
throw new TypeError("Recipe can only contain function names or functions");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue