isaacscript-common 1.2.69 → 1.2.70

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -80,3 +80,7 @@ export declare function onSetSeed(): boolean;
80
80
  * message (which `Isaac.ConsoleOutput()` does not do by default).
81
81
  */
82
82
  export declare function printConsole(msg: string): void;
83
+ /**
84
+ * Helper function to repeat code N times. This is faster to type and cleaner than using a for loop.
85
+ */
86
+ export declare function repeat(n: int, func: () => void): void;
@@ -53,4 +53,13 @@ end
53
53
  function ____exports.printConsole(self, msg)
54
54
  Isaac.ConsoleOutput(msg .. "\n")
55
55
  end
56
+ ____exports["repeat"] = function(self, n, func)
57
+ do
58
+ local i = 0
59
+ while i < n do
60
+ func(nil)
61
+ i = i + 1
62
+ end
63
+ end
64
+ end
56
65
  return ____exports
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "1.2.69",
3
+ "version": "1.2.70",
4
4
  "description": "Helper functions for IsaacScript mods",
5
5
  "keywords": [
6
6
  "isaac",