Cross platform CLI Alerts with colors & colored symbols for success, info, warning, error.
Work on macOS, Linux, and Windows.
npm install super-alert-cli
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'
});
Type: object
Default: {}
You can specify the options below.
Type: string
Default: error
Type: string
Default: You forgot to define all options.
(Error message)
Type: string
Default: ''
(Empty string)
- MIT © [Madan Kumar]https://github.com/Madan007)
- Code of Conduct