1.0.5 • Published 1 year ago

alert-log v1.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Capture d’écran 2022-11-14 à 09 03 23

alert-log

image

Install

npm install alert-log

image

Usage

import alert from 'alert-log';

OR

const alert = require('alert-log');
// Provide the type, msg and name options

alert({ type: `success`, msg: `All done!` });
// Prints: ✔   SUCCESS   All done!

alert(`success`, `All done!`);
// Prints: ✔   SUCCESS   All done!

alert({ type: `warning`, msg: `You didn't add something` });
// Prints:  ⚠   WARNING   You didn't add something

alert(`warning`, `You didn't add something`);
// Prints:  ⚠   WARNING   You didn't add something

alert({ type: `info`, msg: `Awesome cli app` });
// Prints:  ℹ   INFO   Awesome cli app
alert(`info`, `Awesome cli app`);
// Prints:  ℹ   INFO   Awesome cli app

alert({ type: `error`, msg: `Something went wrong` });
// Prints: ⨯   ERROR   Something went wrong
alert(`error`, `Something went wrong`);
// Prints: ⨯   ERROR   Something went wrong

image

API

alert(options)

❯ options

Type: object Default: {}

You can specify the options below.

❯ type

Type: string Default: error

❯ msg

Type: string Default: You provided an invalid type

❯ name

Type: string Default: You provided an invalid type

alert(type, msg, name);

You can specify the options below.

❯ type

Type: string Default: error

❯ msg

Type: string Default: You provided an invalid type

❯ name

Type: string Default: error

image

License & Conduct

image

Connect