Typed Function

JSON →
library 4.2.2 ·javascript
verified May 27, 2026

typed-function (current stable version 4.2.2) is a JavaScript utility library designed to centralize and manage runtime type checking and automatic type conversion for function arguments. It allows developers to define multiple signatures for a single function, supporting union types, the `any` type, and variable arguments. This approach helps in separating type validation logic from core business logic, leading to cleaner code and more informative error messages when functions are called with incorrect input. The library aims to improve robustness and debuggability in JavaScript applications by providing consistent and helpful error messages, preventing silent failures due to invalid inputs. It is actively maintained and supports various environments, including Node.js (>=18) and modern browsers. Its key differentiators include flexible signature definition, detailed error reporting, and optional type conversion.

total hits 12
actors 4 distinct systems
last hit 3d ago AhrefsBot
GPTBot
5
Script
1
Search engines
1
Humans
1

top countries 🇺🇸 United States · 🇨🇦 Canada · 🇩🇪 Germany · 🇫🇷 France · 🇸🇬 Singapore