# jsdiff

> Text differencing library with character, word, line, and structured patch APIs

- HTML version: https://robbiepalmer.me/technologies/jsdiff
- Website: https://github.com/kpdecker/jsdiff

jsdiff compares text at several token granularities and returns ordered runs of unchanged, inserted, and removed content. Its character mode treats Unicode code points as tokens.

Diff operations can set an edit-distance or time limit. The function returns no result when it reaches that limit, which lets batch pipelines bound difficult comparisons explicitly. Version 8 and later include TypeScript definitions.

## Projects using this technology

- [Agent-first Writing Editor](https://robbiepalmer.me/projects/agent-first-writing.md)

## Architecture decision records

- [ADR 008: jsdiff source alignment without outcome inference](https://robbiepalmer.me/projects/agent-first-writing/adrs/008-jsdiff-source-alignment-without-outcome-inference.md)

---

Markdown index of this site: https://robbiepalmer.me/llms.txt
