super-alert-cli
v1.1.1
Published
Cross platform CLI Alerts with colors & colored symbols for success, info, warning, error. Works on macOS, Linux, and Windows.
Downloads
13
Readme
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
License & Conduct
- MIT © [Madan Kumar]https://github.com/Madan007)
- Code of Conduct