@rohank/ts-utils
v1.0.0
Published
Collection of utility functions and types to simplify common TypeScript patterns.
Readme
TS-Utils - TypeScript Utilities
Author: Rohan Khayech
TS-Utils provides a collection of utility functions and types to simplify common TypeScript patterns.
Features
Array Utilities
filterDistinct<T>(array, key?):Filters an array to only include distinct elements.
Type Guards
isNonEmptyArray<T>(value):Checks if a value is a valid array withlength > 0.isObject<T>(value):Returns whether a value is a defined, non-null object.isPresent<T>(value):Returns whether a value is defined and non-null.
Type Utilities
Mutable<T>:Makes all properties in typeTmutable.Unknown<T>:Represents a valid, non-nullish object with properties ofTasunknown.
License and Copyright
Copyright © 2026 Rohan Khayech
TS-Utils is licensed under the MIT license.
