From 457150f1755d60eeb5b90a0d8222df14306783c3 Mon Sep 17 00:00:00 2001 From: Ardis Lu Date: Sat, 18 Mar 2023 22:04:04 -0700 Subject: [PATCH] Make function prefix optional --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 6cf4740..e40dbaf 100644 --- a/index.html +++ b/index.html @@ -68,7 +68,7 @@ // Extract the function name and parameters // Original regex is from wagmi-dev/abitype // https://github.com/wagmi-dev/abitype/blob/main/src/human-readable/runtime/signatures.ts#L31 - const functionRegex = /^function (?[a-zA-Z0-9_]+)\((?.*?)\)/; + const functionRegex = /^(function )?(?[a-zA-Z0-9_]+)\((?.*?)\)/; const { name, parameters } = functionRegex.exec(fn).groups; // Drop parameter names and extraneous whitespace, if there are any -- 2.47.3