From 58b0d06760d2693565c772328f0b0a924bb4d658 Mon Sep 17 00:00:00 2001 From: wjaaaaaaat <04amid.foyer@icloud.com> Date: Mon, 17 Feb 2025 14:54:35 -0500 Subject: [PATCH] add boolean args removeNonAlphChars, strictMode --- src/core/operations/FromHex.mjs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/core/operations/FromHex.mjs b/src/core/operations/FromHex.mjs index cd82d7df..d3c469d0 100644 --- a/src/core/operations/FromHex.mjs +++ b/src/core/operations/FromHex.mjs @@ -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); } /**