super-alert-cli

1.1.1 • Public • Published

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


super-alert-cli

📟

Install

npm install super-alert-cli

⚙️

Usage

const alert = require('super-alert-cli');

// When success options are provided
//Output: ✔  SUCCESS  All done!
alert({
	type: `success`,
	msg: `All done!`
});

// When warning options are provided
//Output: ⚠  WARNING  No serious damage, can ignore.
alert({
	type: `warning`,
	msg: `No serious damage, can ignore.`
});

// When info options are provided
//Output: ℹ  INFO  Needs certain improvements.
alert({
	type: `info`,
	msg: `Needs certain improvements.`
});

// When error options are provided
//Output: ✖  ERROR  Oops something went wrong!
alert({
	type: `error`,
	msg: `Oops something went wrong!`
});

// When success options are provided with custom name label
//Output: ✔  Done  Operation Completed!.
alert({
	type: `success`,
	msg: `Operation Completed!.`,
	name: 'Done'
});

📃

API

alert(options)

❯ options

Type: object
Default: {}

You can specify the options below.

❯ type

Type: string
Default: error

❯ msg

Type: string
Default: You forgot to define all options. (Error message)

❯ name

Type: string
Default: '' (Empty string)


📝

Changelog

❯ Read the changelog here →

License & Conduct


🙌

Readme

Keywords

Package Sidebar

Install

npm i super-alert-cli

Weekly Downloads

0

Version

1.1.1

License

MIT

Unpacked Size

5.78 kB

Total Files

4

Last publish

Collaborators

  • madan007