Lightweight, tree-shakable TypeScript utility functions for everyday projects.
@helpers4 is a collection of zero-dependency helper functions designed for any TypeScript or JavaScript project, regardless of framework. Every function is individually importable and fully supports tree-shaking — only the code you use ends up in your bundle.
Install only what you need, or grab everything at once:
| Package | Description | Install |
|---|---|---|
@helpers4/all |
Complete collection — all categories in one package | npm i @helpers4/all |
@helpers4/array |
Array operations, chunking, comparison, and manipulation | npm i @helpers4/array |
@helpers4/date |
Date utilities, comparison, and validation | npm i @helpers4/date |
@helpers4/function |
Function composition and utility wrappers | npm i @helpers4/function |
@helpers4/number |
Numeric operations and formatting | npm i @helpers4/number |
@helpers4/object |
Object manipulation, deep comparison, and merging | npm i @helpers4/object |
@helpers4/observable |
RxJS Observable helpers and operators | npm i @helpers4/observable |
@helpers4/promise |
Promise utilities, retry, delay, and error handling | npm i @helpers4/promise |
@helpers4/string |
String manipulation — capitalize, slugify, camelCase, etc. | npm i @helpers4/string |
@helpers4/type |
Type guards and type-checking utilities | npm i @helpers4/type |
@helpers4/url |
URL parsing, manipulation, and normalization | npm i @helpers4/url |
@helpers4/version |
Semantic version parsing and comparison | npm i @helpers4/version |
npm install @helpers4/string @helpers4/arrayimport { capitalize } from '@helpers4/string';
import { chunk } from '@helpers4/array';
capitalize('hello world'); // "Hello world"
chunk([1, 2, 3, 4, 5], 2); // [[1, 2], [3, 4], [5]]- Zero dependencies — no bloat, no supply-chain risk
- Tree-shakable — only import what you use
- TypeScript-first — full type safety with generics
- Individually packaged — install one category or all of them
- Consistent API — uniform naming conventions across all modules (e.g.,
quickCompare,deepCompare,compare) - Fully tested — comprehensive test suite with mutation testing via Stryker
Full API documentation is available at helpers4.dev/ts.
# Install dependencies
pnpm install
# Run tests
pnpm test
# Run tests with coverage
pnpm test:coverage
# Type checking
pnpm typecheck
# Lint
pnpm lint
# Build all packages
pnpm buildContributions are welcome! Please see our Contributing Guide for details.
- Fork the repository
- Create your feature branch (
git checkout -b feat/amazing-feature) - Commit your changes following Conventional Commits
- Push to the branch and open a Pull Request
This project is licensed under the GNU Lesser General Public License v3.0 — you can freely use it in proprietary or open-source projects.
|
Bérenger |