1.3 KiB
1.3 KiB
Proposal: @suaveplan/utils — Universal Utility Library
Change ID
enterprise-utils
Status
Shipped
Summary
Introduce @suaveplan/utils as a comprehensive universal utility library under universal/data/utils. This package provides commonly needed utilities: debug logging with deduplication, object manipulation (deep merge, clone, pick/omit, nested path access), platform detection (Node/Browser/Bun), float encoding utilities (Float16/32/64 pack/unpack), and pseudo-random array selection.
Motivation
Shared utility functions currently duplicated across packages. Centralizing them in a single well-tested package reduces redundancy, increases reuse, and ensures consistent error handling with OTel instrumentation.
Scope (Part 1)
debug: Circular-buffer deduplication loggerobject: 15 object manipulation utilities with OTel spansplatform: Injectable platform adapter with Node/Browser/Bun detectionnumber: Float16/32/64 pack/unpack with DataViewrandom: Deterministic pseudo-random array selection
Part 2 (follow-on)
email,sound,string,validate,validationmodules
Dependencies
@suaveplan/error— error substrate@suaveplan/types— shared type interfaces@opentelemetry/api— observabilityzod— schema validationtslib— TypeScript helpers