Skip to content

DeepakBarwal/alerts-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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


alerts-cli

📟

Install

npm install alerts-cli

⚙️

Usage

import alert from 'alerts-cli';

// 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!

📃

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)


📃

License & Conduct


🙌

Connect

GitHub

Twitter

LinkedIn

About

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

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published