# @primeuix/utils

> Utility functions and helpers for PrimeUI Libraries

Latest version **0.8.2** (published 2026-09-08) · SEE LICENSE IN LICENSE.md license · 0 weekly downloads

## Install

```sh
npm install @primeuix/utils
pnpm add @primeuix/utils
yarn add @primeuix/utils
bun add @primeuix/utils
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score; high quality score.

Warnings: low downloads; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.8.2 |
| Published | 2026-09-08 |
| First published | 2024-06-19 |
| Weekly downloads | 0 |
| License | SEE LICENSE IN LICENSE.md |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=12.11.0 |
| Dependencies | 0 |
| Unpacked size | 112.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | PrimeTek Informatics |
| Maintainers | mert.sincan, cagatay.civici |
| Keywords | utilities, helpers, primeng, primereact, primevue, primeuix |

## Links

- npm: https://www.npmjs.com/package/@primeuix/utils
- Issues: https://support.primeui.dev
- npm.io page: https://npm.io/package/@primeuix/utils

## Alternatives

- [lodash.assign](https://npm.io/package/lodash.assign.md) — 2.3M weekly downloads
- [lodash.chunk](https://npm.io/package/lodash.chunk.md) — 1.8M weekly downloads
- [react-native-ios-utilities](https://npm.io/package/react-native-ios-utilities.md) — 138.5K weekly downloads
- [@technically/lodash](https://npm.io/package/@technically/lodash.md) — 50.9K weekly downloads
- [@fluid-topics/ft-icon](https://npm.io/package/@fluid-topics/ft-icon.md) — 20.6K weekly downloads

## Recent versions

- 0.8.2 (latest) — 2026-09-08
- 0.8.1 — 2026-08-10
- 0.8.0 — 2026-07-15
- 0.8.0-rc.4 — 2026-07-15
- 0.8.0-rc.3 — 2026-07-15
- 0.8.0-rc.2 — 2026-07-07
- 0.8.0-rc.1 — 2026-07-02
- 0.7.2 — 2026-05-18
- 0.7.1 — 2026-03-04
- 0.7.0 — 2026-02-25
- 0.6.4 — 2026-01-19
- 0.6.3 — 2025-11-14
- 0.6.2 — 2025-10-27
- 0.6.1 — 2025-07-31
- 0.6.0 — 2025-07-02
- … 24 more at https://npm.io/package/@primeuix/utils/versions

## README

# PrimeUIX Utils

Low-level utility functions shared across PrimeUI libraries. Covers the DOM, object comparison and transformation, class name merging, event bus, UUID generation, z-index management, and prop merging. Each domain is a separate subpath so bundlers can tree-shake unused areas.

```ts
import { find, addClass, getOffset, getFocusableElements } from '@primeuix/utils/dom';
import { deepMerge, resolveFieldData, isEmpty, toCamelCase } from '@primeuix/utils/object';
import { cn } from '@primeuix/utils/classnames';
import { EventBus } from '@primeuix/utils/eventbus';
import { ZIndex } from '@primeuix/utils/zindex';
```

**DOM** covers element queries, position and offset calculations, CSS class helpers, scroll utilities, hidden element dimension detection, browser detection, and transition/animation presence checks.

**Object** covers deep and shallow equality, deep merge, field resolution by dot-path, type guards (`isArray`, `isDate`, `isEmpty`), array helpers, and string case converters (`toCamelCase`, `toKebabCase`, `toFlatCase`).

**Class names** — `cn()` accepts strings, arrays, and `{ className: boolean }` objects and merges them into a single string.

**EventBus** is a lightweight pub/sub for cross-package communication without framework dependencies.

**ZIndex** is a stacking context tracker that assigns and releases z-index values in the correct order for overlapping overlays.

## License

Licensed under the [PrimeUI License](https://primeui.dev/licenses) - Copyright (c) [PrimeTek Informatics](https://www.primetek.com.tr)

---
_Source: https://npm.io/package/@primeuix/utils · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
