add boolean args
removeNonAlphChars, strictMode
This commit is contained in:
parent
d9fb3e28dd
commit
58b0d06760
@ -30,6 +30,16 @@ class FromHex extends Operation {
|
||||
name: "Delimiter",
|
||||
type: "option",
|
||||
value: FROM_HEX_DELIM_OPTIONS
|
||||
},
|
||||
{
|
||||
name: "Remove non-alphabet chars",
|
||||
type: "boolean",
|
||||
value: true
|
||||
},
|
||||
{
|
||||
name: "Strict mode",
|
||||
type: "boolean",
|
||||
value: false
|
||||
}
|
||||
];
|
||||
this.checks = [
|
||||
@ -92,8 +102,8 @@ class FromHex extends Operation {
|
||||
* @returns {byteArray}
|
||||
*/
|
||||
run(input, args) {
|
||||
const delim = args[0] || "Auto";
|
||||
return fromHex(input, delim, 2);
|
||||
const [delim, removeNonAlphChars, strictMode] = [args[0] || "Auto", args[1], args[2]];
|
||||
return fromHex(input, delim, 2, removeNonAlphChars, strictMode);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user