changed-lines

1.0.0 • Public • Published

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.

Dependencies (1)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i changed-lines

    Weekly Downloads

    2

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    2.91 kB

    Total Files

    4

    Last publish

    Collaborators

    • aleclarson