@npmcli/disparity-colors
Spiritual sucessor to disparity. Colorizes Diff Unified format output using ansi-styles.
Install
npm install @npmcli/disparity-colors
Usage:
const colorize = require('@npmcli/disparity-colors')
mapWorkspaces(`--- a/src/index.js
+++ b/src/index.js
@@ -1,4 +1,5 @@
"use strict";
+"use foo";
const os = require("os");
`)
API:
colorize(str, opts = {}) -> String
str
: A Diff Unified format stringopts
:
headerLength
: A Number defining how many lines should be colorized as header
Returns
A String including the appropriate ANSI escape codes
LICENSE
ISC