1.1.1 • Published 3 years ago

super-alert-cli v1.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

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

🙌

1.1.1

3 years ago

1.1.0

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago