# kpdecker/jsdiff

A javascript text differencing implementation.

Repository: https://github.com/kpdecker/jsdiff
Canonical: https://ross.abutalabs.com/products/jsdiff
Language: JavaScript
License: BSD-3-Clause
License Family: permissive
Last push: 2026-08-24T09:40:34+00:00

## Health v2 (maintenance only)
Score: 77/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 99, release rhythm 35, longevity 100
- inputs: {"age_days": 5636, "days_push": 9, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 9197, forks 539 (observed 2026-08-28T04:10:28.826704+00:00)

## What it is
jsdiff is a JavaScript library that computes differences between two texts using the Myers O(ND) diff algorithm. It provides functions to diff text at character, word, line, and sentence granularity, and can generate unified diff patches.

## Use cases
- compare two strings and show what changed
- generate unified diff patches in javascript
- highlight word-level changes between two versions of text
- diff two files line by line in node
- build a text comparison or revision history feature
- compute character-level differences for inline text highlighting

## When to choose
- you need text diffing in JavaScript or TypeScript in Node or the browser
- you want change objects or unified patch output from comparing two texts
- you need configurable tokenization such as case-insensitive or word-level diffs

## When to avoid
- you need to diff structured data like JSON trees or ASTs rather than plain text
- you need binary file diffing or three-way merge tooling
- you are outside the JavaScript ecosystem

## Facets
- artifact type: library
- maturity: stable
- function: parser, developer-tools
- domain: developer-tools, text-editors
- platform: browser, cross-platform
- tags: text-diff, diff-algorithm, myers-diff, patch-generation, javascript, algorithms, nodejs

## Member repositories
- kpdecker/jsdiff (main) score 77

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:10:28.826704+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:23:19.022314+00:00, confidence not recorded.
  - readme: https://github.com/kpdecker/jsdiff (fetched 2026-08-28T04:10:28.826704+00:00, sha fc27dca41a01)
- Data as of 2026-08-30T08:39:29.467469+00:00.
