Skip to content

aleclarson/changed-lines

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

changed-lines v1.0.0

Compare strings just like git diff does! 😎

Thanks to the amazing diff-sequences package. 😇

const diff = require('changed-lines');

// The result is an array.
let res = diff(input, output);

// Optional ansi colors.
const chalk = require('chalk');
res = diff(input, output, {
  green: chalk.green,
  red: chalk.red,
});

The input and output values can be a string or array of strings.