JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 329
  • Score
    100M100P100Q76850F
  • License MIT

Core utility library for Axi Engine, providing common functions for arrays, math, type guards, and more.

Package Exports

  • @axi-engine/utils
  • @axi-engine/utils/dist/index.js
  • @axi-engine/utils/dist/index.mjs

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@axi-engine/utils) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

@axi-engine/utils

NPM version

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/utils

Usage

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 true

API Reference

Browse the API Documentation here