changed-lines
v1.0.0
Published
Compare strings just like `git diff` does
Downloads
9
Readme
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.