All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Async Module: Added
sequence()helper for cleaner sequential async operations- Stops at first error with detailed error reporting
- Returns partial results for debugging
- Cleaner than chaining multiple
awaitTo()calls - Based on community feedback from Dev.to
- Async Result Helpers: New utilities for working with
Promise<Result>allResults()- Collect all Promise outcomes into a single ResultallResultsSync()- Synchronous version for already resolved ResultsanyResult()- Return first successful Result (fallback pattern)anyResultSync()- Synchronous version for already resolved ResultspartitionResults()- Partition Results into successes and failurescollectResults()- Collect all results without short-circuiting
- Better error handling for sequential async operations
- Enhanced TypeScript types for
sequence()result
- Collection Module: Added
partitionObjectfunction
- Added Partition module to namespace
_ - Updated documentation with all new backend-focused utilities
- BREAKING: Minor version bump to 4.1.0
- Encrypt Module (Backend Focus): 20 functions for cryptography
- Added Encrypt module to namespace
_ - Updated documentation with all new backend-focused utilities
- BREAKING: Major version bump to 4.0.1
-
HTTP Module (Backend Focus): 18 functions for type-safe HTTP requests
request,get,post,put,patch,del- HTTP methods with typed responsesbuildUrl- URL construction with query parameterscreateHttpClient- Configurable HTTP client with interceptorsrequestWithRetry,withRetry- Automatic retry with exponential backoffHttpHeaders,ContentTypes- Common HTTP constantsparseAuthHeader,bearerAuth,basicAuth- Authentication helpersparseCookieHeader,buildCookieHeader,mergeHeaders- Header utilities
-
DateTime Module (Backend Focus): 26 functions for date manipulation
toDate,formatDate,toISODateString,toISOString- Date formattingtoUnixTimestamp,fromUnixTimestamp- Unix timestamp conversionaddTime,subtractTime,startOf,endOf,diff- Date manipulationisBefore,isAfter,isSameDate,isSameDay,isBetween- Date comparisonisToday,isYesterday,isTomorrow,isPast,isFuture- Relative checksisLeapYear,isWeekend,isWeekday- Date utilitiestimeAgo,formatDuration,parseDuration- Human-readable durations
-
Path Module (Backend Focus): 14 functions for path manipulation
parsePath,dirname,basename,extname- Path parsingjoinPath,resolvePath,relativePath- Path joiningnormalizePath,isAbsolute,toPosix,toWindows- Path normalizationremoveTrailingSlash,ensureTrailingSlash,commonPath- Path utilities
-
Crypto Module (Backend Focus): 20 functions for cryptography
hash,sha256,sha512,hmac- Hashing functionstimingSafeEqual- Timing-safe string comparisonuuid,randomBytes,randomString,randomInt- Random generationgenerateToken,urlSafeToken- Token generationbase64Encode,base64Decode,base64UrlEncode,base64UrlDecode- Base64 encodingstringToHex,hexToString,bytesToHex,hexToBytes- Hex encodingutf8Encode,utf8Decode- UTF-8 encoding
- Added HTTP, DateTime, Path, and Crypto modules to namespace
_ - Updated documentation with all new backend-focused utilities
- BREAKING: Major version bump to 3.0.0
-
DOM Module (Frontend Focus): 23 functions for type-safe DOM manipulation
querySelector,querySelectorAll- Type-safe element selectionclassNames,addClass,removeClass,toggleClass,hasClass- Class managementaddEventListener,once,delegate- Event handling with cleanupisInViewport,getRect,scrollIntoView,scrollTo,getScrollPosition- Viewport utilitiessetStyle,setStyles,getComputedStyleValue,show,hide,toggle- Style manipulation
-
Storage Module (Frontend Focus): 9 functions for type-safe storage
createStorage,localStorageTyped,sessionStorageTyped- Type-safe storage wrapperswithExpiry- Storage with automatic expirationcreateMemoryStorage- In-memory storage for SSR/testinggetCookie,setCookie,removeCookie,hasCookie- Cookie management
-
Color Module (Frontend Focus): 22 functions for color manipulation
hexToRgb,rgbToHex,rgbToHsl,hslToRgb- Color format conversionparseColor,formatRgb,formatHsl- Color parsing and formattinglighten,darken,saturate,desaturate,opacity,mix- Color manipulationinvert,grayscale- Color transformationsluminance,contrast,isLight,isDark,getContrastColor- Color analysisisSimilar,getDominant,getTemperature- Advanced color utilities
- Added DOM, Storage, and Color modules to namespace
_ - Updated documentation with all new frontend-focused utilities
- Renamed
invertfrom color module toinvertColorto avoid conflict with object module
-
Collection: 4 new functions
reject- Returns elements that do NOT match the predicate (opposite of filter)size- Returns the size of any collection (array, object, string, Map, Set)keyBy- Creates an object indexed by a key functionsampleSize- Returns N random elements from an array
-
String: 7 new functions
deburr- Removes diacritical marks (accents) from stringsescape- Escapes HTML special characters to prevent XSSunescape- Converts HTML entities back to charactersescapeRegExp- Escapes special RegExp characterspad- Pads a string on both sidespadStart- Pads a string on the leftpadEnd- Pads a string on the right
-
Object: 4 new functions
findKey- Finds the first key where predicate returns truefindLastKey- Finds the last key where predicate returns trueat- Gets values at multiple paths from an objectinvertBy- Inverts object keys/values with grouping
- Updated documentation with all new functions and examples
- Version bump for documentation updates
- Namespace Export Fix: All categories now properly exported in
_namespace- Added
logicmodule (28 functions:when,unless,ifElse,cond, etc.) - Added
iteratormodule (24 functions:lazyRange,lazyMap,lazyFilter, etc.) - Added
narrowingmodule (34 functions:filterDefined,assertType,refine, etc.) - Added
schemamodule (27 functions:string,number,parse,validate, etc.) - Added
arraymodule (49 functions:unionWith,without,union, etc.)
- Added
- Fixed
_.unionWith is not a functionerror - Fixed missing Array category functions in namespace
- Fixed TypeScript unique symbol export limitations for
typedmodule
- Optimized bundle: enabled minification, removed sourcemaps
- Improved README with comparison table, real-world examples, and migration guide
- 15 new utility modules across 9 new categories:
- Reactive:
signal,computed,effect,batch,createUndoableState - Cache:
smartCache,memoize - Event:
createEventBus,createTypedEmitter - Pipeline:
pipe,pipeAsync,flow,createMiddleware,compose - DI:
createContainer,createTypedContainer - Env:
env,createEnv - Router:
route,createRouter - Form:
createForm,field - Feature:
createFeatureFlags,flag
- Reactive:
- Updated documentation with all new categories
- Enhanced homepage example with type-safe event bus showcase
- Initial public release
- 18 utility modules:
- Core:
isDefined,isNil,assert,assertDefined,fail,noop,identity,unreachable - Guards:
isObject,isString,isNumber,hasKey,hasKeys,isEmpty, and 50+ type guards - Object:
pick,omit,keysTyped,mapObject,get,set,merge,clone - Async:
awaitTo,retry,sleep,withTimeout,debounce,throttle,parallel - Collection:
unique,groupBy,partition,chunk,compact,sortBy,range - Input:
safeJsonParse,parseNumber,parseBoolean,parseDate,coerceArray,defaults - Flow:
pipe,tap,when,match,tryCatch,ifElse - DX:
debug,invariant,assertNever,todo,measure - Typed:
defineConst,defineEnum,brand,narrow,model,v - String:
capitalize,camelCase,kebabCase,snakeCase,truncate - Fn:
partial,curry,once,memoize,negate - Math:
clamp,round,sum,average,random - Result:
ok,err,Result,fromPromise,map,flatMap - Iterator:
createIterator,lazyRange,lazyMap,lazyFilter - Decorator:
memoize,debounce,throttle,log,deprecated - Logic:
when,unless,cond,match,coalesce,defaultTo - Narrowing:
filterDefined,assertType,refine,narrow - Schema:
string,number,object,array,parse,validate
- Core:
- Complete TypeScript support with full type inference
- Zero dependencies
- Tree-shakable ESM and CJS builds