command-line-alerts

1.0.1 • Public • Published

cli-alerts

Cross platform CLI Alerts with colors & colored symbols for success, info, warning, error. Work on macOS, Linux, and Windows.

Install

npm install cli-alerts

Usage

const alert = require("cli-alerts");
// Provide the type, msg, and name options.
alert({ type: `success`, msg: `Everything finished!` });
// Prints: ✔ SUCCESS Everything finished!

alert({ type: `success`, msg: `Everything finished!`, name: `DONE` });
// Prints: ✔ DONE Everything finished!

alert({ type: `warning`, msg: `You didn't add something!` });
// Prints: ⚠ WARNING You didn't add something!

alert({ type: `info`, msg: `Awais is awesome!` });
// Prints: ℹ INFO Awais is awesome!

alert({ type: `error`, msg: `Something went wrong!` });
// Prints: ✖ ERROR Something went wrong!

Package Sidebar

Install

npm i command-line-alerts

Weekly Downloads

0

Version

1.0.1

License

none

Unpacked Size

2.87 kB

Total Files

3

Last publish

Collaborators

  • armindersingh