cli-alerts-stripari
v1.0.2
Published
> original cli-alerts tutorial by AhmadAwais
Downloads
4
Readme
npx cli-alerts-stripari
original cli-alerts tutorial by AhmadAwais
Install
npm install cli-alerts-stripari
[insert github link]
Usage
const alert = require('cli-alerts-stripari');
// 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 addd something!`});
// Prints: ⚠ WARNING You didn't add something!
alert({type: `info`, msg: `Steven is awesome!`});
// Prints: ℹ INFO Steven is awesome!
alert({type: `error`, msg: `Something went wrong!`});
// Prints: ✖ ERROR Something went wrong!
[insert github link] (./../../)
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)