cli-alerts-l

1.0.3 • Public • Published

cli-alerts-l

Cross platform CLI Alerts with colours works on macOS, Window and Linux Alerts success, info, warning, error`

Install

npm install cli-alerts-l

Usage

const alert = require('cli-alerts-l');

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

> name

Type: string
Default: ''

Package Sidebar

Install

npm i cli-alerts-l

Weekly Downloads

0

Version

1.0.3

License

MIT

Unpacked Size

4.27 kB

Total Files

4

Last publish

Collaborators

  • kamonleigh