From 07e151e4da263ffa9069e628e188f55f29593ef1 Mon Sep 17 00:00:00 2001 From: cpunch Date: Tue, 20 May 2025 02:16:10 -0500 Subject: [PATCH] deprecated MV_OMIT_FUNCTION, all hail MV_OMIT --- content/docs/macros/MV_OMIT_FUNCTION.md | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/content/docs/macros/MV_OMIT_FUNCTION.md b/content/docs/macros/MV_OMIT_FUNCTION.md index 033e6a6..899cfb8 100644 --- a/content/docs/macros/MV_OMIT_FUNCTION.md +++ b/content/docs/macros/MV_OMIT_FUNCTION.md @@ -1,22 +1,29 @@ --- weight: 100 -title: "MV_OMIT_FUNCTION" +title: "MV_OMIT" description: "Omit all mangling steps" icon: "code_blocks" date: "2025-05-01T18:47:58-05:00" lastmod: "2025-05-01T18:47:58-05:00" --- -`declare function MV_OMIT_FUNCTION(omit: (A...) -> R...): (A...) -> R...` +`declare function MV_OMIT(omit: any): any` -will omit all mangling steps from the passed function, will also disregard any indexes set by `MV_INDEX_TO_NUM` +will omit all mangling steps from the passed expression, will also disregard any indexes set by `MV_INDEX_TO_NUM`. Passing a function to this can be useful to keep performance-critical sections unobfuscated. + +`MV_OMIT_FUNCTION` is also an available alias. ## Valid Usage ```lua -local dontMangleMe = MV_OMIT_FUNCTION(function() - print("im in plaintext!") +local dontMangleMe = MV_OMIT(function() + print("this whole function is in plaintext!") end) donMangleMe() + +for i = 1, 10 do + local a = MV_OMIT("plaintext string") + print(a .. "im obfuscated") +end ``` \ No newline at end of file