API Reference
Welcome to the API reference for @duplojs/utils. This section presents all available functions, organized by data type.
🛠️ Common
Cross-cutting utilities and generic helpers usable with any data type: pipes, composition, identity, and more.
📋 Array
Complete collection of functions to manipulate arrays: map, filter, reduce, sort, and advanced operations like partition or chunk.
🏢 Clean
Core building blocks of Clean Architecture: creation of business entities, business types (NewType), use cases.
📊 DataParser
Tools to parse and validate incoming data. Transform raw data into typed structures with custom validation rules.
🕦 Date
New Date type based on the Unix timestamp + functions to manipulate dates and times: difference calculations, time zone handling, and advanced date operations.
🔀 Either
Either monad for functional error handling. Avoid exceptions and manage success/error results explicitly and type-safely.
⚡ Generator
Utility functions to work with generators and create lazy sequences. Ideal for efficiently handling large amounts of data.
🔤 String
Functions to manipulate strings immutably. Find operations like capitalize, trim, split, replace, and much more.
🔢 Number
Utilities to work with numbers: math operations, formatting, validation, conversions, and advanced calculations.
📦 Object
Deep object manipulation: property transformations, merging, cloning, validation, and safe access to nested values.
🎯 Pattern
Powerful pattern matching system for TypeScript. Create complex conditions, handle union types, and write declarative, type-safe code.
Organization
Each function page follows the MDN documentation structure:
- Description: Clear explanation of what the function does
- Example: Interactive code and basic use case
- Parameters: Detailed description of each parameter
- Examples: Interactive code and concrete use cases
- Specifications: Additional information and edge cases
