started docs!
This commit is contained in:
22
content/docs/macros/MV_INDEX_TO_NUM.md
Normal file
22
content/docs/macros/MV_INDEX_TO_NUM.md
Normal file
@@ -0,0 +1,22 @@
|
||||
---
|
||||
weight: 100
|
||||
title: "MV_INDEX_TO_NUM"
|
||||
description: "Obfuscates named indexes"
|
||||
icon: "article"
|
||||
date: "2025-05-01T18:47:58-05:00"
|
||||
lastmod: "2025-05-01T18:47:58-05:00"
|
||||
---
|
||||
|
||||
`declare function MV_INDEX_TO_NUM(tbl: {}): {}`
|
||||
|
||||
will replace all instances of named indexes with a unique number constant.
|
||||
|
||||
## Valid Usage
|
||||
|
||||
```lua
|
||||
local foo = MV_INDEX_TO_NUM({total = 0})
|
||||
for i = 1, 10 do
|
||||
foo.total = foo.total + i
|
||||
end
|
||||
return foo.total
|
||||
```
|
||||
Reference in New Issue
Block a user