Back to Explore

unjs/ohash

GitHub
1 watchersOpen source

Last release: 3/4/2025

Ohash provides simple utilities for hashing, serializing, and comparing JavaScript values. It exports functions like hash and digest (SHA-256 with Base64URL), isEqual for object equality checks, and diff to produce change lists between objects based on serialization.

Project status

  • The repository shows activity after the cited update summaries, with an upstream push on 2026-06-05, suggesting ongoing maintenance, though the details of that push are not shown here.
  • Update cadence appears bursty, with multiple updates on 2025-03-03 to 2025-03-04 (v2.0.10, v2.0.11, and v1.1.6), and no additional updates are listed in the provided evidence after that period.

AI summary generated Today

AI-generated from public sources. May be inaccurate. Report

Recent updates

  • v2.0.11

    3/4/2025

    Release v2.0.11 release notes only document a few fixes in the `serialize` implementation (globalThis collision, `toJSON()` return types, and Map serialization with object keys). However, the actual code changes between the compared versions show a much larger refactor that alters the public API surface and hashing behavior, including removals and signature changes for `objectHash`, `murmurHash`, `sha256`, and options-based hashing.

  • v1.1.6

    3/4/2025

    v1.1.6 adds a forward compatible subpath export for `./utils` so consumers can import from `ohash/utils`. The release notes are otherwise minimal, but the code diff also shows additional export aliases and re-exports, plus CI and dev tooling updates.

    Features
  • v2.0.10

    3/3/2025

    v2.0.10 focuses on performance improvements to serialization, specifically faster typed array serialization and faster handling of objects with string keys. The release notes only mention these performance tweaks and do not call out any behavioral or compatibility changes.

  • v2.0.9

    3/2/2025

    v2.0.9 focuses on improving `serialize` performance and making serialization more robust for built-in objects. The release notes highlight faster `Date` serialization and additional handling for objects with null constructors and global constructor name recognition.

  • v1.1.5

    3/1/2025

    Release v1.1.5 primarily adds new named exports `digest` and `serialize` intended for forward compatibility. The code changes are limited to export aliases in `src/index.ts`, plus several CI and tooling updates (Node version, branch filters, release command, and dependency/tooling version bumps).

    Features
  • v2.0.8

    3/1/2025

    Release v2.0.8 notes focus on performance improvements to `serialize` and a build/export tweak to expose `isEqual` from the main entrypoint for backward compatibility. However, the provided code diff shows substantially broader API and crypto implementation changes than what the v2.0.8 release notes document.

  • v2.0.7

    2/28/2025

    v2.0.7 focuses on improving performance of the serialization/comparison logic, especially around symbol and number handling. The release notes mention a faster serialize implementation and additions to benchmark coverage, but do not call out any behavioral edge-case changes.

  • v2.0.6

    2/27/2025

    ohash v2.0.6 updates the `serialize` implementation with a new fast path for comparing primitive values and improved handling of circular references. The release notes only mention these user-facing areas, but the code diff shows a broader internal refactor of the serializer and additional behavior changes around object handling.

    Breaking
  • v2.0.5

    2/25/2025

    Release v2.0.5 updates how typed arrays are serialized by the hashing/serialization utilities. The change focuses on producing correct, type-specific string output for typed arrays.

    BreakingFeatures
  • v2.0.4

    2/20/2025

    v2.0.4 makes a Node.js runtime change to speed up hashing by using `process.getBuiltinModule` to access the built-in `crypto.hash` fast path when available. It also updates the build pipeline to minify more crypto-related output.