@lucaspl3tti/ts-helpers
v1.0.1
Published
A lightweight, type-safe collection of utility functions to speed up your TypeScript and JavaScript development.
Readme
@lucaspl3tti/ts-helpers
A lightweight, type-safe collection of utility functions to speed up your TypeScript and JavaScript development.
✨ Features
This library provides helper methods across several classes:
- Utilities: Your Swiss Army knife for common tasks like vdelays, debouncing, iteration, and random generation.
- DOM: Easily handle element manipulation like changing classes and styles or create entire elements from scratch.
- Color: Advanced conversion (Hex, RGB, HSL) and contrast calculation.
- Formatting: Helpers for manipulating strings, dates, and numbers.
- DeviceAccess & ViewportAccess: Check device types and viewport dimensions reliably and listen to Viewport Changes.
- ArrayAccess & ObjectAccess: Safe accessors and manipulation tools.
- Event Emitter: A simple typed event emitter implementation.
📦 Installation
Install the package via npm:
npm install @lucaspl3tti/ts-helpers🚀 Usage
You can import specific helpers to keep your bundle size small (tree-shaking supported), or import grouped modules.
Basic Example
import { DOM } from '@lucaspl3tti/ts-helpers';
Dom.addClass(element, 'my-custom-class');📄 License
MIT License © 2026 Jan-Luca Splettößer
