Get beautiful consoles easily
Using NPM
npm i @emersonbraun/pretty-log
OR Yarn
yarn add @emersonbraun/pretty-log
import package
import PrettyLog from '@emersonbraun/pretty-log' //es6
var PrettyLog = require('@emersonbraun/pretty-log').default // old form
Type Info
PrettyLog.info('test info')
const hello = 'hello word'
PrettyLog.info('test info', hello)
PrettyLog.success('teste success')
Output:
Type success (with var)
const hello = 'hello word'
PrettyLog.success('teste success', hello)
PrettyLog.warn('teste warn')
const hello = 'hello word'
PrettyLog.warn('teste warn', hello)
PrettyLog.error('teste error')
const hello = 'hello word'
PrettyLog.error('teste error', hello)
pass options
Name | Value | Obs |
---|---|---|
icon | 'cross', 'tick', ... | Options in figures |
iconColor | 'red', 'blue', ... | Options in chalk |
title | string | Any text |
titleColor | 'red', 'blue', ... | Options in chalk |
PrettyLog.custom('teste custom', null, {
iconColor: 'white',
icon: 'bullet',
})
const hello = 'hello word'
PrettyLog.custom('teste custom', hello, {
iconColor: 'white',
icon: 'bullet',
})
We use SemVer for versioning. For the versions available, see the tags on this repository.
- emersonbraun - Initial work - EmersonBraun
See also the list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE.md file for details