Introduction
@explita/utils is a lightweight, versatile collection of TypeScript utility functions and React hooks designed for everyday development. Streamline your Node.js, React, and Next.js projects with well-organized helpers for strings, objects, dates, arrays, and more.
Features
- String Manipulation: Formatting, casing, slugifying, validation, and color conversion.
- Object Transformation: Deep merge, flatten/unflatten, pick/omit, and key prefixing.
- Date Utilities: Formatting, shifting, comparing, and relative time helpers.
- Array Utilities: Chunking, deduplication, grouping, and shuffling.
- React Hooks:
useList,useLocalStorage(cross-tab sync),useDisclosure,useWindowSize, and more. - File Export: Save data as CSV, XML, or JSON directly from the browser.
- Type Safety: Built with TypeScript from the ground up.
Installation
npm install @explita/utilspnpm add @explita/utilsyarn add @explita/utilsQuick Start
import { capitalize, slugify, formatDate, deepMerge } from "@explita/utils";
import { useList, useLocalStorage } from "@explita/utils/react";
// String helpers
capitalize("hello"); // "Hello"
slugify("Hello World!"); // "hello-world"
// Date helpers
formatDate(new Date(), "YYYY-MM-DD"); // "2026-06-17"
// Object helpers
deepMerge({ a: 1 }, { b: 2 }); // { a: 1, b: 2 }
// React hooks
function App() {
const [items, { append, remove }] = useList(["Task 1"]);
const [theme, setTheme] = useLocalStorage("theme", "dark");
// ...
}Documentation
String UtilitiesObject UtilitiesDate UtilitiesNumber & Array UtilitiesReact HooksAdvanced UtilitiesAPI Reference
Support the Mission
@explita/utils is built to save developers time with everyday utilities. If it has helped you, please consider supporting the project!
- Sponsor on GitHub
- Buy Me A Coffee
- Give us a ⭐ — It helps others discover the project.
- Report bugs or suggest new features .
License
MIT © Explita
Last updated on