print-diff
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

print-diff

Prints a pretty diff of two strings.

Installation

npm install --save print-diff

Usage

import { printUnifiedDiff } from 'print-diff'

printUnifiedDiff('Hello\nLinus', 'Hello\nworld')

Output


import { printInlineDiff } from 'print-diff'

printInlineDiff('The quick pink fox', 'The quick brown fox')

Output

API

printUnifiedDiff(actual, expected[, out])

Prints a unified diff.

printInlineDiff(actual, expected[, out])

Prints an inline diff.

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i print-diff

Weekly Downloads

26,735

Version

2.0.0

License

MIT

Unpacked Size

4.2 kB

Total Files

8

Last publish

Collaborators

  • linusu