Releases: Open-Tech-Foundation/js-std
@opentf/std@1.0.0-beta.3
Minor Changes
- df5ea5d: Crypto
- Added sha256(input) — SHA-256 hash, cross-runtime (Node/Bun sync, browser/Deno async)
- Added sha512(input) — SHA-512 hash, cross-runtime
- Added hmacSHA256(key, message) — HMAC-SHA-256 digest
- Added hmacSHA512(key, message) — HMAC-SHA-512 digest
- Added randomFloat(min, max) — cryptographically strong random float
Array - Added flatMap(arr, fn), zip(...arrays), unzip(arr), sample(arr)
- Added takeWhile(arr, fn), dropWhile(arr, fn), chunkWhile(arr, fn), partition(arr, fn)
- Added flatten(arr, depth) with depth support
- Renamed uniq → unique (merged uniqueBy via optional by callback)
- Renamed arrayInsert/arrayRemove/arrayReplace → insert/remove/replace
Iter (Sync & Async) - Added full sync iterator equivalents: mapIter, filterIter, flatMapIter, reduceIter, toArrayIter, eachIter, someIter, everyIter, findIter, findLastIter, findIndexIter, findLastIndexIter, firstIter, lastIter, nthIter, countIter, takeWhileIter, dropWhileIter
- Added eachIterAsync, someIterAsync, everyIterAsync, findIterAsync, findLastIterAsync, findIndexIterAsync, findLastIndexIterAsync, firstIterAsync, lastIterAsync, nthIterAsync, countIterAsync, takeWhileIterAsync, dropWhileIterAsync, fromIterAsync, toAsyncIter
- Renamed forEachIterAsync → eachIterAsync
- Added isIterable and isAsyncIterable type guards
Runtime Detection - Added isNode(), isBrowser(), isDeno(), isBun() — cross-runtime detection
Object - Fixed prototype pollution guard formatting in get, set, has, merge, clone, etc.
Concurrency - Added eachAsync(arr, fn) (renamed from forEachAsync)
@opentf/std@1.0.0-beta.2
Minor Changes
-
37a1df8: 🛡️ Security Fixes Implemented:
Performed a security audit of all object-manipulation utilities and implemented strict key filtering to block access to sensitive keys (proto, constructor, prototype). The following utilities are now secured:
set.ts: Prevented path-based pollution of the global prototype.
unset.ts: Blocked the ability to delete properties from the global prototype (preventing DoS attacks).
merge.ts & mergeAll.ts: Added guards to prevent deep-merging from traversing into internal object properties.
clone.ts: Ensured that cloning an object cannot inadvertently modify the prototype of the new instance.
mapKeys.ts: Protected against transformation mappers that return sensitive key names.
@opentf/std@1.0.0-beta.1
Patch Changes
- fae9b36: Fixed build to have readme and license copied for publishing.
@opentf/std@1.0.0-beta.0
Major Changes
-
46ad161: ### v1.0.0-beta.1 Release Audit & Stabilization
- Project Modernization: Migrated the entire codebase to Bun, Vitest, and Biome. Overhauled the build system and CI pipeline for high-performance execution and cross-runtime verification.
- FlowControl Module: Introduced a comprehensive suite of execution control utilities:
idleRun(Debounce with leading/trailing/maxWait)paceRun(Throttle with leading/trailing)batchRun(Argument grouping and delayed execution)memoizeRun(Async caching with Single Flight and TTL)retryRun(Exponential backoff and retry logic)timeoutRun(Enforce execution time limits)rateLimitRun(Rolling window rate limiting)
- Unified Color Utility: Replaced fragmented color functions with a powerful, unified
colorutility supporting Hex, RGB, HSL, and OKLCH. Added advanced features likecolorMix,colorContrast,colorInvert, and ANSI TrueColor support. - Crypto & Encoding: Added industrial-strength utilities for
uuidv4,uuidv7,randomId,base64, andhexencoding/decoding. - Math Utilities:
- Refactored
sum,prod,mean,median, andmodeto be generic<T>, supporting object arrays with custom callbacks. - Corrected
prod([])to return1(mathematical empty product). - Fixed
modeto return[]for unique element sets.
- Refactored
- Array Utilities:
min,max, andboundsnow support string arrays (lexicographical comparison).- Overhauled
rangeandsortByfor better performance and compliance with ECMAScript proposals.
- String Utilities:
- Rewrote
stringWidthto useIntl.Segmenterfor accurate character counting. - Improved
stripANSIregex for broader terminal sequence coverage.
- Rewrote
- Object Utilities:
- Standardized performance for
merge,clone,omit, andpick. - Added strict input clamping and enhanced error handling across all path-based utilities.
- Standardized performance for
- Documentation & DX:
- Launched a premium Nextra-based documentation site with interactive REPL demos for every utility.
- Audited and refactored all 148+ utilities for consistency.
- Added project branding and version badges.
@opentf/std@0.13.0
Minor Changes
- 8d0ddfd: Added aResolvers aync utils.
@opentf/std@0.12.0
Minor Changes
- 66bdf45: Fixed isObj to support class.
@opentf/std@0.11.0
Minor Changes
- 0d1451e: Added mutable set & unset variant functions.
@opentf/std@0.10.0
Minor Changes
- 7a05b94: Added array shuffle & swap functions.
@opentf/std@0.9.0
Minor Changes
- 928a959: Added Set Composition methods like isSubsetOf, isSupersetOf & isDisjointFrom and Fixed size function to return -1 instead of null for unsupported types.
@opentf/std@0.8.1
Patch Changes
- f12c647: Updated readme with articles section.