2.0.0 • Published 2 years ago

print-diff v2.0.0

Weekly downloads
111
License
MIT
Repository
github
Last release
2 years ago

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