index.js
function stringDiff(existing, proposed, method) {
  method = method || 'diffJson';
  lazy.diff[method](existing, proposed).forEach(function (res) {
    var color = utils.gray;
    if (res.added) color = utils.green;
    if (res.removed) color = utils.red;
    process.stdout.write(color(res.value));
  });
  console.log('\n');
}
function stringDiff(existing, proposed, method) {
  method = method || 'diffJson';
  lazy.diff[method](existing, proposed).forEach(function (res) {
    var color = utils.gray;
    if (res.added) color = utils.green;
    if (res.removed) color = utils.red;
    process.stdout.write(color(res.value));
  });
  console.log('\n');
}
function stringDiff ( existing , proposed , method ) { method = method || 'diffJson' ; lazy . diff [ method ] ( existing , proposed ) . forEach ( function ( res ) { var color = utils . gray ; if ( res . added ) color = utils . green ; if ( res . removed ) color = utils . red ; process . stdout . write ( color ( res . value ) ) ; } ) ; console . log ( '\n' ) ; }
Show a diff comparison of the existing content versus the content
about to be written.

@param  {String} `existing`
@param  {String} `proposed`
@param  {String} method Optionally pass a specific method name from the [diff] library to use for the diff.
@return {String} Visual diff comparison.
Show a diff comparison of the existing content versus the content about to be written .