2.2.2 • Published 6 months ago

better-cli-alerts v2.2.2

Weekly downloads
-
License
MIT
Repository
-
Last release
6 months ago

Cross platform CLI Alerts with colors with Catpuccin colors and custom messages. Work on macOS, Linux, and Windows.

better-cli-alerts

Install

npm install better-cli-alerts

Usage

const alert = require("better-cli-alerts");
// or if you use modules
import alert from "better-cli-alerts";

// Success message
alert({
  type: `success`,
  message: ` All is good! `,
  description: `YAY :)!`,
});

// Info message
alert({
  type: `info`,
  message: ` Some useful info `,
  description: `FYI...`,
});

// Warning message
alert({
  type: `warning`,
  message: ` Careful! `,
  description: `CAREFUL :/`,
});

// Error message
alert({
  type: `error`,
  message: ` Something is wrong! `,
  description: `OOPS! :(`,
});

// Using custom messages
alert({
  type: `error`,
  message: ` Something is wrong! `,
  description: `YOUR CUSTOM MESSAGE`,
});

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)

❯ description

Type: string Default: '' (Empty string)

License & Conduct

Connect

Credits

2.2.1

6 months ago

2.2.0

6 months ago

2.2.2

6 months ago

2.1.0

6 months ago

2.0.0

6 months ago

1.1.4

2 years ago

1.1.3

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago