/string-diff-viewer

Compare two string and generate human-friendly output to stdout

Primary LanguageJavaScriptMIT LicenseMIT

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