Skip to content

helpers4/typescript

helpers4

@helpers4

Lightweight, tree-shakable TypeScript utility functions for everyday projects.

npm version npm pre-release npm downloads release status license tsgo tree-shakable


Overview

@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.

Packages

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

Quick Start

npm install @helpers4/string @helpers4/array
import { 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]]

Key Features

  • 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

Documentation

Full API documentation is available at helpers4.dev/ts.

Development

# 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 build

Contributing

Contributions are welcome! Please see our Contributing Guide for details.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feat/amazing-feature)
  3. Commit your changes following Conventional Commits
  4. Push to the branch and open a Pull Request

License

This project is licensed under the GNU Lesser General Public License v3.0 — you can freely use it in proprietary or open-source projects.

Contributors

Bérenger
Bérenger

About

A set of helpers in TS/JS, compatible with tree-shaking, which helps you to manipulate URL, Observables, ...

Resources

License

LGPL-3.0, LGPL-3.0 licenses found

Licenses found

LGPL-3.0
LICENSE
LGPL-3.0
LICENSE.md

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors