@axi-engine/utils 0.1.0 → 0.1.1

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.
Files changed (2) hide show
  1. package/README.md +37 -0
  2. package/package.json +2 -1
package/README.md ADDED
@@ -0,0 +1,37 @@
1
+ # @axi-engine/utils
2
+
3
+ [![NPM version](https://img.shields.io/npm/v/@axi-engine/utils.svg)](https://www.npmjs.com/package/@axi-engine/utils)
4
+
5
+ Core utility library for Axi Engine.
6
+
7
+ Provides a set of common, standalone functions for arrays, math, type guards, random generation, and more.
8
+
9
+ ## Installation
10
+
11
+ ```bash
12
+ npm install @axi-engine/utils
13
+ ```
14
+
15
+ ## Usage
16
+
17
+ Here are a few examples of how to use the utilities from this package:
18
+
19
+ ```typescript
20
+ import { randInt, clampNumber, haveSameElements } from '@axi-engine/utils';
21
+
22
+ // Get a random integer
23
+ const diceRoll = randInt(1, 7); // Returns a number between 1 and 6
24
+
25
+ // Clamp a value
26
+ const health = clampNumber(120, 0, 100); // Returns 100
27
+
28
+ // Compare arrays without order
29
+ const isSame = haveSameElements(['a', 'b'], ['b', 'a']); // Returns true
30
+ ```
31
+
32
+ API Reference
33
+
34
+ A full API documentation, automatically generated from the source code, is available here:
35
+
36
+ [Full API Documentation](./docs/api/README.md)
37
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axi-engine/utils",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Core utility library for Axi Engine, providing common functions for arrays, math, type guards, and more.",
5
5
  "license": "MIT",
6
6
  "keywords": [
@@ -14,6 +14,7 @@
14
14
  "types": "./dist/index.d.ts",
15
15
  "scripts": {
16
16
  "build": "tsup src/index.ts --format cjs,esm --dts --clean",
17
+ "docs": "typedoc src/index.ts --out docs/api --options ../../typedoc.json",
17
18
  "test": "echo 'No tests yet for @axi-engine/utils'"
18
19
  },
19
20
  "files": [