farm-invest-cli
Version:
Are there new investment opportunities on FarmCrowdy, ThriveAgric or EFarms?
13 lines (11 loc) • 438 B
JavaScript
const chalk = require('chalk').default
const printDiff = (diff) => {
diff.removed.forEach(line => {
console.log(chalk.red(JSON.stringify(line, null, 2).replace(/\n/g, '\n-').replace('{', '-{')))
})
diff.added.forEach(line => {
console.log(chalk.green(JSON.stringify(line, null, 2).replace(/\n/g, '\n+').replace('{', '+{')))
})
}
module.exports = printDiff
module.exports.printDiff = printDiff