Skip to content

Releases: observ33r/jsoncmp

v1.0.4

22 Jul 13:07
Compare
Choose a tag to compare

Refactor

  • Extracted JSONCmpValue into separate JSONCmpArray and JSONCmpObject types for improved clarity and stricter type safety.
  • Removed all internal as any casts in favor of properly typed structures.

Documentation

  • Expanded Usage section in README to show full type signatures and improve clarity.
  • Updated Benchmark section with latest results.

Build

  • Added tslib dependency required for @rollup/plugin-typescript.

Other

  • Minor internal cleanups and comment improvements.

v1.0.3

22 Jul 08:07
Compare
Choose a tag to compare

Chore

  • Added sideEffects: false flag to package.json for proper tree-shaking in ESM-aware bundlers.

Documentation

  • Added JSR Score badge to the README.
  • Improved usage example to include all valid JSON primitives (string, null, boolean).
  • Merged "Benchmark" and "Running Benchmark" sections into one for better structure.
  • Linked to benchmark data source for transparency and easier navigation.

v1.0.2

21 Jul 06:56
Compare
Choose a tag to compare

Chore

  • Add main field in package.json to support npm consumers and tools like bundlephobia.
  • Normalize repository.url to follow npm metadata expectations.

Docs

  • Minor cleanup and refinements in README.md.

v1.0.1

21 Jul 05:18
Compare
Choose a tag to compare

Features

  • Strict deep structural equality for JSON-compatible values:
    • number, string, boolean, null
    • nested arrays and plain objects
  • Runtime-optimized comparison:
    • Tailored branch orderings for V8 and JavaScriptCore
  • Tiny output (~2.5 kB minified)
  • Zero dependencies
  • Fully type-safe with JSONCmpValue union type

Benchmarked against

  • lodash.isEqual
  • fast-equals
  • dequal/lite
  • native JSON.stringify fallback
  • Node’s built-in isDeepStrictEqual

See benchmark for full results.

Environment support

  • Node.js ≥ 18
  • Modern browsers
  • Cloudflare Workers
  • Deno
  • Bun