# terminal-diff

> A tool for keeping track of what is on your terminal screen

Latest version **1.0.0** (published 2013-08-08) · BSD license · 0 weekly downloads

## Install

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

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2013-08-08 |
| First published | 2013-08-08 |
| Weekly downloads | 0 |
| License | BSD |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Joe Sullivan |
| Maintainers | itsjoesullivan |
| Keywords | terminal, diff |

## Links

- npm: https://www.npmjs.com/package/terminal-diff
- Repository: https://github.com/itsjoesullivan/terminal-diff
- npm.io page: https://npm.io/package/terminal-diff

## Dependencies (1)

- [underscore](https://npm.io/package/underscore.md) ~1.4.4

## Alternatives

- [localforage](https://npm.io/package/localforage.md) — 6.2M weekly downloads
- [localforage-observable](https://npm.io/package/localforage-observable.md) — 30.8K weekly downloads
- [@y/y](https://npm.io/package/@y/y.md) — 30.1K weekly downloads
- [@metaobjectsdev/render](https://npm.io/package/@metaobjectsdev/render.md) — 3.5K weekly downloads
- [@ledgerhq/coin-algorand](https://npm.io/package/@ledgerhq/coin-algorand.md) — 1.1K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2013-08-08

## README

#terminal-diff

A small library for handling the diffing that is useful for rendering applications on a terminal screen


var TerminalDiff = require('terminal-diff');

var tdiff = new TerminalDiff();

tdiff.on('reset',function(text) {
	var lines = text.split('\n');

	//Clear the screen for a redraw.
	screen.clear();

	//Write in line
	lines.forEach(function(content,lineIndex) {

		//Write the line to the screen
		screen.write({
			line: lineIndex,
			content: content
		});
	});
}); 

tdiff.on('update', function(diff) {
	diff.forEach(screen.write);
});

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