Skip to main content
This release was yanked — the latest version of @coven/compare is 0.3.3. Jump to latest

Built and signed on GitHub Actions

⚖️ Minimalist diffing.

This package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers
This package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Bun
This package works with Browsers
JSR Score
100%
Published
2 months ago (0.1.0)
Coven Engineering Compare logo

JSR JSR Score

🪞 Minimalistic deep comparison.

This library takes 2 values (a left and a right) and returns an iterator with all the differences between said values. The differences are represented by 3 kinds:

  • Create: Missing left and existing right.
  • Update: Different left and right values.
  • Delete: Existing left and missing right.

Example

import { compare } from "@coven/compare";

compare("Coven", "Engineering"); // Yields { kind: "UPDATE", left: "Coven", right: "Engineering" }
Built and signed on
GitHub Actions
View transparency log

Add Package

deno add jsr:@coven/compare

Import symbol

import * as compare from "@coven/compare";

---- OR ----

Import directly with a jsr specifier

import * as compare from "jsr:@coven/compare";

Add Package

npx jsr add @coven/compare

Import symbol

import * as compare from "@coven/compare";

Add Package

yarn dlx jsr add @coven/compare

Import symbol

import * as compare from "@coven/compare";

Add Package

pnpm dlx jsr add @coven/compare

Import symbol

import * as compare from "@coven/compare";

Add Package

bunx jsr add @coven/compare

Import symbol

import * as compare from "@coven/compare";