aboutsummaryrefslogtreecommitdiffstats
path: root/util/hex.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2022-03-04 15:22:45 +0000
committerMatthew Wild <mwild1@gmail.com>2022-03-04 15:22:45 +0000
commitab835fed13e300b3a49131296917f5038eb6c06c (patch)
treea55d78e6ff4e53a8ccbdd6d9e8d7509a3a7f3133 /util/hex.lua
parentfe56effa55147a7deb8ee754c092af899e662c73 (diff)
downloadprosody-ab835fed13e300b3a49131296917f5038eb6c06c.tar.gz
prosody-ab835fed13e300b3a49131296917f5038eb6c06c.zip
util.hex: Deprecate to/from in favour of encode/decode, for consistency!
Diffstat (limited to 'util/hex.lua')
-rw-r--r--util/hex.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/util/hex.lua b/util/hex.lua
index 4cc28d33..6202620f 100644
--- a/util/hex.lua
+++ b/util/hex.lua
@@ -23,4 +23,8 @@ local function from(s)
return (s_gsub(s_lower(s), "%X*(%x%x)%X*", hex_to_char));
end
-return { to = to, from = from }
+return {
+ encode = to, decode = from;
+ -- COMPAT w/pre-0.12:
+ to = to, from = from;
+};