Socket
Socket
Sign inDemoInstall

prettycli

Package Overview
Dependencies
7
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.2.0 to 1.3.0

35

index.js

@@ -1,2 +0,2 @@

const chalk = require('chalk');
const chalk = require('chalk')

@@ -8,21 +8,26 @@ const colorMap = {

error: 'red'
};
}
const print = (type, label, message) => {
const color = colorMap[type];
console.log(chalk.inverse.bold[color](` ${label} `), chalk[color](message), '\n');
};
const color = colorMap[type]
console.log(
chalk.inverse.bold[color](` ${label} `),
chalk[color](message),
'\n'
)
}
const info = (label, message) => print('info', label, message);
const warn = (message) => print('warn', 'WARN', message);
const loading = (label, message) => print('loading', label, message);
const info = (label, message) => print('info', label, message)
const warn = message => print('warn', 'WARN', message)
const loading = (label, message) => print('loading', label, message)
const command = (command) => chalk.blue(command);
const link = (url) => chalk.blue(url);
const command = command => chalk.blue(command)
const link = url => chalk.blue(url)
const error = (err, options = {exit: true}) => {
print('error', 'ERROR', err);
if (options.exit) throw(new Error(err));
};
const error = (err, options = { exit: true, silent: false }) => {
print('error', 'ERROR', err)
if (options.silent) process.exit(1)
if (options.exit) throw new Error(err)
}
module.exports = {info, loading, warn, error, command, link};
module.exports = { info, loading, warn, error, command, link }
{
"name": "prettycli",
"version": "1.2.0",
"version": "1.3.0",
"description": "Pretty print messages on the terminal",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc