alerting-cli
v1.0.0
Published
This is cross platform CLI Alert with colors and symbols for warning like success,failure,warning and error.Works on all platforms
Downloads
23
Maintainers
Readme
alerting-cli
This is a Alert CLI made with nodejs. It has colors and symbols for success, error, warning and info. It is compatible with all platforms.
Installation
npm i alerting-cli
Usage
const alert = require('alerting-cli');
alert({
type: "error",
msg: "hello, it is a error!",
name: "FAILURE"
});
//provide the type, msg and name.
Examples:
const alert = require("./index.js");
alert({
type: "info",
msg: "hello, it is a info!",
name: "Important Notice",
});
alert({
type: "success",
msg: "hello, it is a success!",
});
alert({
type: "warning",
msg: "hello, it is a warning!",
});
alert({
type: "error",
msg: "hello, it is a error!",
});
API
alert(options)
> options
Type: object Default : {}
> name
Type: string Default : ""
> msg
Type: string Default : "all options not defined!"
Options Explained
- type - "error" , "success" , "warning" , "info"
- msg - you can provide any message you want.
- name - default name are: "SUCCESS","ERROR","WARNING" and "INFO". you can provide your own name as well