@eds-fw/utils
Advanced tools
+1
-1
@@ -18,3 +18,3 @@ { | ||
| "name": "@eds-fw/utils", | ||
| "version": "3.2.0", | ||
| "version": "3.2.1", | ||
| "description": "Tiny TypeScript utils: wait(), chanceRandom(), formatNumber(), equal(), quickTextCompare() and more", | ||
@@ -21,0 +21,0 @@ "main": "index.mjs", |
+4
-10
@@ -7,3 +7,3 @@ <p align="center"> | ||
| Tiny utils: chanceRandom(), equal(), PacketBuffer, VersionBits, expandDir(), splitIntoPortions() and more | ||
| Tiny utils: chanceRandom(), equal(), PacketBuffer, VersionBits, ActionQueue, splitIntoPortions() and more | ||
@@ -36,2 +36,5 @@ </b> | ||
| >- supports `using` declarations | ||
| - *class* `ActionQueue` | ||
| >- *constructor* `(cooldownMs: number)` | ||
| >- `push (action: () => unknown): void` | ||
| - `splitIntoPortions <T>(arr: T[], portionSize: number): T[][]` | ||
@@ -53,11 +56,2 @@ - `expandDir (dir_path: string): string[]` | ||
| ```js | ||
| // file.js, type: CJS | ||
| const { random, arrRandom } = require("@eds-fw/utils"); | ||
| let colors = ["red", "green", "blue"]; | ||
| console.log(`Random int: ${random(1, 100)}, random color: ${arrRandom(colors)}`); | ||
| //> Random int: 32, random color: blue | ||
| //...it is one of 300 variants | ||
| ``` | ||
| ...or: | ||
| ```js | ||
| // file.js, type: ESM | ||
@@ -64,0 +58,0 @@ import { random, arrRandom } from "@eds-fw/utils"; |
16453
-1.13%93
-6.06%