Skip to content

Releases: Open-Tech-Foundation/js-std

@opentf/std@1.0.0-beta.3

01 May 12:35

Choose a tag to compare

Pre-release

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

27 Apr 08:31
2f34e3d

Choose a tag to compare

Pre-release

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

26 Apr 21:57
896357f

Choose a tag to compare

Pre-release

Patch Changes

  • fae9b36: Fixed build to have readme and license copied for publishing.

@opentf/std@1.0.0-beta.0

26 Apr 21:41

Choose a tag to compare

Pre-release

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 color utility supporting Hex, RGB, HSL, and OKLCH. Added advanced features like colorMix, colorContrast, colorInvert, and ANSI TrueColor support.
    • Crypto & Encoding: Added industrial-strength utilities for uuidv4, uuidv7, randomId, base64, and hex encoding/decoding.
    • Math Utilities:
      • Refactored sum, prod, mean, median, and mode to be generic <T>, supporting object arrays with custom callbacks.
      • Corrected prod([]) to return 1 (mathematical empty product).
      • Fixed mode to return [] for unique element sets.
    • Array Utilities:
      • min, max, and bounds now support string arrays (lexicographical comparison).
      • Overhauled range and sortBy for better performance and compliance with ECMAScript proposals.
    • String Utilities:
      • Rewrote stringWidth to use Intl.Segmenter for accurate character counting.
      • Improved stripANSI regex for broader terminal sequence coverage.
    • Object Utilities:
      • Standardized performance for merge, clone, omit, and pick.
      • Added strict input clamping and enhanced error handling across all path-based utilities.
    • 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

08 Jul 19:43
2d1cc21

Choose a tag to compare

Minor Changes

  • 8d0ddfd: Added aResolvers aync utils.

@opentf/std@0.12.0

29 Apr 18:51

Choose a tag to compare

Minor Changes

  • 66bdf45: Fixed isObj to support class.

@opentf/std@0.11.0

29 Apr 05:42
f328e16

Choose a tag to compare

Minor Changes

  • 0d1451e: Added mutable set & unset variant functions.

@opentf/std@0.10.0

21 Apr 15:54
76eccea

Choose a tag to compare

Minor Changes

  • 7a05b94: Added array shuffle & swap functions.

@opentf/std@0.9.0

19 Apr 11:36
e99131c

Choose a tag to compare

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

18 Apr 09:53
1767244

Choose a tag to compare

Patch Changes

  • f12c647: Updated readme with articles section.