@axi-engine/utils
v0.1.5
Published
Core utility library for Axi Engine, providing common functions for arrays, math, type guards, and more.
Downloads
615
Maintainers
Readme
@axi-engine/utils
Core utility library for Axi Engine.
Provides a set of common, standalone functions for arrays, math, type guards, random generation, and more.
Installation
npm install @axi-engine/utilsUsage
Here are a few examples of how to use the utilities from this package:
import { randInt, clampNumber, haveSameElements } from '@axi-engine/utils';
// Get a random integer
const diceRoll = randInt(1, 7); // Returns a number between 1 and 6
// Clamp a value
const health = clampNumber(120, 0, 100); // Returns 100
// Compare arrays without order
const isSame = haveSameElements(['a', 'b'], ['b', 'a']); // Returns trueAPI Reference
Will be available when code and repository will be fully published
