瀏覽代碼

chore: changeset

Sven 1 年之前
父節點
當前提交
231a79c
共有 1 個文件被更改,包括 11 次插入0 次删除
  1. 11 0
      .changeset/light-bats-repair.md

+ 11 - 0
.changeset/light-bats-repair.md

@@ -0,0 +1,11 @@
+---
+"@sv443-network/userutils": minor
+---
+
+Refactored code and documentation and added new functions:
+- mapRange() to map a number from one range to the same spot in another range
+- randRange() to generate a random number between a min and max boundary
+- randomItem() to return a random item from an array
+- randomItemIndex() to return a tuple of a random item and its index from an array
+- takeRandomItem() to return a random item from an array and mutate it to remove the item
+- randomizeArray() to return a copy of the array with its items in a random order