# diff-view

> Diff viewer based on simple diff

Latest version **1.0.15** (published 2026-05-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install diff-view
pnpm add diff-view
yarn add diff-view
bun add diff-view
```

## Health

**Score 55/100 (C)** — status: active.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 1.0.15 |
| Published | 2026-05-14 |
| First published | 2016-12-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 40.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Tomi Trescak |
| Maintainers | tomitrescak |
| Keywords | Diff |

## Links

- npm: https://www.npmjs.com/package/diff-view
- Repository: https://tomitrescak@github.com/tomitrescak/meteor-diff
- Homepage: https://github.com/tomitrescak/meteor-diff#readme
- Issues: https://github.com/tomitrescak/meteor-diff/issues
- npm.io page: https://npm.io/package/diff-view

## Dependencies (1)

- [circular-json-es6](https://npm.io/package/circular-json-es6.md) ^2.0.1

## Recent versions

- 1.0.15 (latest) — 2026-05-14
- 1.0.14 — 2024-07-11
- 1.0.13 — 2024-07-11
- 1.0.12 — 2017-09-20
- 1.0.9 — 2017-09-20
- 1.0.8 — 2017-09-20
- 1.0.7 — 2017-08-17
- 1.0.6 — 2017-06-30
- 1.0.5 — 2017-02-20
- 1.0.4 — 2017-01-30
- 1.0.3 — 2017-01-30
- 1.0.2 — 2017-01-17
- 1.0.1 — 2016-12-15
- 1.0.0 — 2016-12-14

## README

# Introduction

Calculates and visualises differences between textual files. Uses teh popular [JSDifflib](https://github.com/cemerick/jsdifflib). Outputs either as HTML or plain text in Github style.

# Examples

To calculate **deltas** for two files:

```
var a = ' a\
b\
c'

var b = ' d\
b'
```

## HTML output

```
DiffView.compare(a, b)
```

for **side by side** configuration outputs:

|   | Old text |   | New text |
| ---- | -------- | ---- | -------- |
| 1 | a        | 1 | d        |
| 2 | b        | 2 | b        |
| 3 | c        |   |          |

and for the **inline** configuration outputs

|   |   | Text |
| ---- | ---- | -------- |
| 1 |   | a       |
|   | 1 | d       |
| 2 | 2 | b       |
| 3 |   | c

## Textual output

```
console.log(DiffViewSimple.compare(a, b));
```

outputs

```
- (1,) a
+ (,1) d
- (3,) c
```

To see the more examples and options please see the original [documentation](https://github.com/cemerick/jsdifflib)

---
_Source: https://npm.io/package/diff-view · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
