1
Watch
0
Star
0
Fork
0
Issue

Compare two string and generate human-friendly output to stdout

fengzilong
fengzilong
pushedAt 3 months ago

fengzilong/string-diff-viewer

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

ucloud ads