From 45abd567de4d840b2f541065ff1b1e8d6fea46a2 Mon Sep 17 00:00:00 2001 From: XeonSquared Date: Thu, 25 May 2017 00:57:10 +0000 Subject: [PATCH] added a minifier rule for tostring and tonumber, should reduce code size a fair bit --- modules/base/header.lua | 2 +- strip.lua | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/base/header.lua b/modules/base/header.lua index a9ee54e..05bc074 100644 --- a/modules/base/header.lua +++ b/modules/base/header.lua @@ -1,4 +1,4 @@ -tT,p,cT,pC,C,T={},1,1,1,coroutine,table +tT,p,cT,pC,C,T,TS,TN={},1,1,1,coroutine,table,tostring,tonumber function E() if tT[cT] ~= nil then return tT[cT][3] end end diff --git a/strip.lua b/strip.lua index cb8e3db..4428a89 100644 --- a/strip.lua +++ b/strip.lua @@ -25,6 +25,8 @@ replacements={ {"%-%-.-\n",""}, {"coroutine%.","C."}, {"table%.","T."}, +{"tostring","TS"}, +{"tonumber","TN"}, } for k,v in ipairs(replacements) do while ss:find(v[1]) ~= nil do