TypeScript Utility Library

Everyday Utilities.Zero Dependencies.

A lightweight collection of TypeScript helpers and React hooks for strings, objects, dates, arrays, and more. Tree-shakable, type-safe, and ready to use.

Tree-Shakable ESM
70+ Utilities
14+ React Hooks

Everything You Need, Nothing You Don't

A comprehensive set of utilities organized by category — import only what you need, tree-shaken away by your bundler.

String Manipulation

25+ helpers for formatting, casing, truncate, mask, pluralize, slugifying, validation, and color conversion.

Object Transformation

Deep merge, get (dot path), compactObject, flatten/unflatten, pick/omit, key prefixing, and BigInt-safe JSON.

Date Utilities

30+ helpers for formatting, formatRelative, timeAgo, timeUntil, start/end of day, shifting, and interval checks.

Number & Array

keyBy, sortBy, partition, clamp, formatCompactNumber, range, chunking, deduplication, and set operations.

React Hooks

useClipboard, useOnClickOutside, useMediaQuery, useIntersectionObserver, useLocalStorage, useList, and more.

File Export & Async

Save CSV/XML/JSON from browser, Zod validation helpers, tryAxios, timeout, memoize, debounce, and retry.

Start Using in 10 Seconds

Install, import, and use — no configuration files or build setup required.

1

Install

npm install @explita/utils

Install the package via npm, pnpm, or yarn with zero peer dependencies.

2

Import

import { slugify, formatDate } from "@explita/utils"

Import only the functions you need — tree-shaking handles the rest.

3

Use

slugify("Hello World!") // "hello-world"
formatDate(new Date(), "YYYY-MM-DD")

Call the function. Every utility is fully typed with zero-config setup.

4

Or React

import { useList } from "@explita/utils/react"

Framework-specific subpaths for React hooks, Axios, Zod, and file export.

Two Entry Points for Any Project

Use the core package everywhere, or reach for framework-specific subpaths when you need React hooks or platform features.

Core Utilities

Framework-agnostic, tree-shakable

  • 25+ string helpers (truncate, mask, pluralize, slugify)
  • Object utilities (deepMerge, get, compactObject)
  • 30+ date utilities (formatDate, timeAgo, timeUntil)
  • Number, array, and async utilities (keyBy, sortBy, timeout, memoize)
Best for: Node.js, API routes, framework-agnostic apps

Framework Extras

React hooks & platform-specific subpaths

  • useClipboard, useOnClickOutside, useMediaQuery, useIntersectionObserver
  • useList, useLocalStorage (cross-tab sync), useDisclosure
  • tryAxios — typed error handling with kind & meta
  • Zod validation, browser file export (CSV/XML/JSON)
Best for: React, Next.js, Remix, and browser-only contexts

Ready to Simplify Your Code?

One install command. Zero configuration. Hundreds of hours saved.

npm install @explita/utils