Skip to content

Latest commit

 

History

History
30 lines (19 loc) · 570 Bytes

README.md

File metadata and controls

30 lines (19 loc) · 570 Bytes

string-diff-viewer

Compare two string and generate human-friendly output to stdout (based on git-split-diffs)

Installation

npm i string-diff-viewer

Usage

const { diff, format } = require( 'string-diff-viewer' )

;( async () => {
  const diffs = await diff( oldStr, newStr )
  console.log( await format( diffs ) )
} )()

Related

License

MIT