Skip to main content

Temelj

A big standard library for TypeScript. Temelj provides a collection of well-tested, modular utilities that extend TypeScript’s capabilities. Each package is designed to solve common programming challenges with elegant, type-safe APIs.

Overview

Temelj is available as individual packages under @temelj/<package>, or as a unified dependency through @tinrab/temelj/<package>. Choose the approach that best fits your project structure. The library includes utilities for:
  • Async operations with retry, debounce, throttle, and concurrency control
  • Result types for functional error handling
  • String case conversions and manipulation
  • Iterator utilities with powerful composition
  • Math operations including vectors and geometric primitives
  • MDX processing and React rendering
  • HTTP request helpers
  • ID generation and color utilities

@temelj/async

Utilities for working with async operations including retry, debounce, and concurrency primitives

@temelj/result

A result value type for functional error handling in TypeScript

@temelj/string

String manipulation utilities with case conversions

@temelj/iterator

Utilities for working with iterables and ranges

@temelj/math

Math utilities including vectors and geometric operations

@temelj/mdx

Utilities for working with MDX documents

@temelj/request

HTTP request utilities and helpers

@temelj/id

ID generation utilities

Why Temelj?

Temelj (Slovenian for “foundation”) provides battle-tested utilities that help you write cleaner, more maintainable TypeScript code. Each package is:
  • Type-safe: Built with TypeScript-first design
  • Modular: Install only what you need
  • Well-tested: Comprehensive test coverage
  • Zero-dependency: Most packages have no external dependencies
  • Tree-shakeable: Optimized for modern bundlers

Get started

Installation

Install Temelj packages via npm, pnpm, or JSR

Quick start

Get up and running with Temelj in minutes

Build docs developers (and LLMs) love