reuse-alerts

1.1.0 • Public • Published

npm i reuse-alerts

Use this package for extra colors and symbols for your alert messages

Usage

const alert = require('reuse-alerts')

// You can choose between SUCCESS, INFO, WARNING, ERROR

alert() // Prints: ERROR You forgot to do something

alert({ type: 'success', msg: 'Completed!', name: 'Hey' }) // Prints: Hey Completed!

alert({ type: 'info', msg: 'This worked' }) // Prints: INFO This worked

alert({ type: 'warning', msg: "You didn't add something!" }) // Prints: WARNING You didn't add something!

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

Readme

Keywords

Package Sidebar

Install

npm i reuse-alerts

Weekly Downloads

2

Version

1.1.0

License

MIT

Unpacked Size

3.35 kB

Total Files

4

Last publish

Collaborators

  • jwsscott777